Re: Need help w/ the DATE syntax
Hi,
I'm trying to set the date criteria in my query but I'm trouble w/ the syntax. Could someone take a quick look? I'm using AC2K, SQL Server 2K.
This is what I tried:
str = "Select * from dbo.v_print_shipping_sched where [cust_ord_due]= #" & Date & "#"
Incorrect syntax near ‘#’.
str = "Select * from dbo.v_print_shipping_sched where [cust_ord_due]= # " & Date & " #"
Incorrect syntax near ‘3’.
str = "Select * from dbo.v_print_shipping_sched where [cust_ord_due]= " & Date & ""
Error display on report
Thanks much!
Hi,
I'm trying to set the date criteria in my query but I'm trouble w/ the syntax. Could someone take a quick look? I'm using AC2K, SQL Server 2K.
This is what I tried:
str = "Select * from dbo.v_print_shipping_sched where [cust_ord_due]= #" & Date & "#"
Incorrect syntax near ‘#’.
str = "Select * from dbo.v_print_shipping_sched where [cust_ord_due]= # " & Date & " #"
Incorrect syntax near ‘3’.
str = "Select * from dbo.v_print_shipping_sched where [cust_ord_due]= " & Date & ""
Error display on report
Thanks much!