Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Win32::ODBC getting syntax error while executing sql

by jonadab (Parson)
on Nov 26, 2008 at 12:18 UTC ( #726087=note: print w/replies, xml ) Need Help??


in reply to Win32::ODBC getting syntax error while executing sql

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.

-- 
We're working on a six-year set of freely redistributable Vacation Bible School materials.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://726087]
help
Chatterbox?
[Corion]: Two-way data binding means that if you change something in a text box, the corresponding variable in your Javascript gets updated immediately as well, and if you then change the variable, the corresponding text box also gets updated
[Corion]: That is a horrible approach that was also taken by Access, but if you have hooks that prevent automatic saving to the database, it is incredibly handy

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2017-03-30 07:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (355 votes). Check out past polls.