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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL update statement

Status
Not open for further replies.

stemitch2000

Programmer
Nov 12, 2003
47
GB
Please can somebody tell me the difference in these two pieces of code - and then tell me how to fix the first one?

UPDATE projects SET Size="Unestimated" WHERE Size = NULL

UPDATE projects SET StartDate = ArrivalDate WHERE StartDate = NULL

The second one work fine. The first doesn't. Size is a text field, and StartDate is a date field.


 
What error are you getting?

Try using single quotes instead of double:

UPDATE projects SET Size='Unestimated' WHERE Size = NULL



Hope This Helps!

Ecobb

"Alright Brain, you don't like me, and I don't like you. But lets just do this, and I can get back to killing you with beer." - Homer Simpson
 
Yeah I tried that, but didn't work.

I have been giving the solution and that was to replace the = to a IS so...

WHERE Size IS NULL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top