Whenever Posted May 12, 2014 Share Posted May 12, 2014 Hello, i am trying to execute this SQL statement but it won't work: SELECT sum(GIEIST) FROM WOCapacity WHERE (WorkCenter<60) AND (GIEIST>0) AND DATEADD(day,convert(int,datum+7200)/86400,'1 Jan 1970') >= DATEADD(wk, DATEDIFF(wk,0,getdate()), 0) AND DATEADD(day,convert(int,datum+7200)/86400,'1 Jan 1970') <= GETDATE()-1 I get the following error message via error handler: "Expected lexical element not found: =, <>, <, <=, >, or >=" I hope you can help me, thank you. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 12, 2014 Moderators Share Posted May 12, 2014 (edited) How about showing your code, so we can see just what you're doing? "trying to execute this SQL statement" doesn't tell us a lot. Edited May 12, 2014 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now