Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
dadunn
Yak Posting Veteran
67 Posts |
Posted - 2001-08-10 : 18:11:35
|
| This query has been working for several months and as of yesterday doesn't.FROM Receipt a INNER JOIN ReceiptDetail b ON a.ReceiptKey = b.ReceiptKeyWHERE a.StorerKey = "SWH" AND (b.Lottable01 = "Unassigned" OR (b.Lottable01 = "" AND b.QtyExpected > 0 AND b.QtyReceived = 0))AND GetDate() >= Convert(datetime,a.VehicleNumber) AND GetDate() < Convert(datetime,a.PlaceOfLoading) AND SKU IN ( SELECT DISTINCT SKU FROM SWH_Drop_Unprocessed) AND SKU IS NOT NullI get this error:Server: Msg 241, Level 16, State 1, Line 1Syntax error converting datetime from character string.I can convert the dates in the select statement jsu fine, but when I try to compare it to getdate() I get the error.Any ideas?ThanksDave |
|
|
|
|
|