Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Problem 1

Status
Not open for further replies.

gscheepers

IS-IT--Management
Jan 21, 2002
150
US
Hi,

I have a problem with a sql that I'm trying to run to update a field according to data that's in an existing field.

My fields/tables is as follows:

Unemprd_cod/PSBPartners
PTRUnemp_dat/PSBPartners (This is date field)

The field that needs to updated is Unemprd_cod/PSBPartners.

This is what I'm trying to do:

If PTRUnemp_dat minus todays date is between 0 months and 6 months then Unemprd_cod = 01

Any help would be greatly appreciated!

Thanks, Gerhard Scheepers
BA - LETEC
 
Update PSBPartners set Unemprd_cod = 01
where (PTRUnemp_dat - sysdate) between 0 and 182
I tried to remain child-like, all I acheived was childish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top