declare @RepDate datetime
Don't you need a semicolon after this declaration?
select @RepDate = max(Date) from CRRWarehouse..AERReportDate where Date >= '1 jan 2008' and [User] like '%SYS%'
Don't you need a semicolon after this SELECT statement?
Also, in general, if you're getting an error in your SQL, I would suggest executing just one SQL statement at a time so that you can easily identify which one has the error in it.
In reply to Re: Win32::ODBC getting syntax error while executing sql
by jonadab
in thread Win32::ODBC getting syntax error while executing sql
by srivasva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |