Hi all,
I need to run a SQL statement in Microsoft VB.
The following statement returns an error "Compile Error: Expected: end of statement". yyyy was highlighted when the error was encountered.
I believe that there are something wrong with my syntax. It could be the quotes (") that I have used to enclose the date format.
I would appreciate if anyone could help to correct.
************************************************
strSQL = "SELECT DISTINCT Min(Format([SHOW_DATE],"yyyy/mm/dd")) AS [Start Date], Max(Format([SHOW_DATE],"yyyy/mm/dd")) AS [End Date] INTO NewSurveys" _
& "From STIXMV_EVENT_SHOW HAVING (((Max(Format([SHOW_DATE],"yyyy/mm/dd")))=Format(Date()-15,"yyyy/mm/dd")));"
************************************************
Regards,
Clarence