I am trying to update records where a field is NULL and another field from
that table matches to another field in a different table.  Im trying to use
somthing like this but it does not seem to work:

UPDATE table1,table2
SET table1.date1 = '#currentdate#'
WHERE table1.date1 IS NULL
AND table1.po = table2.po

I also noticed that table2.po could have several instances of the table1.po,
I guess this wouldn't matter, I just need to be sure that at least one match
exists.


This query will need to run every day, would it be better to make a Stored
Procedure and schedule it in MSSQL7 rather than scheduling it with CF....?
If I do run it in MSSQL7 what syntax do I use to get the current date...?

-Adrian


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to