sammySeltzer
asked on
Incorrect Syntax error - Please heeelp!
Dear experts,
I am using SQL Server 2005 to code the following query but I just kept getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'a'.
What am I doing wrong?
Any help is greatly appreciated.
I am using SQL Server 2005 to code the following query but I just kept getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'a'.
What am I doing wrong?
Any help is greatly appreciated.
SELECT
(SELECT COUNT(*)FROM tblMaster a,tblCODE cWHERE a.chsid=c.chsid and (c.Close_EmployedWhenReleased)='Y' and c. Start_Date > NULL and c. Start_Date < NULL and c. Close_Date > NULL and c.Close_Date < NULL ) AS A,
(SELECT COUNT(*) FROM tblMaster a, tblCODE c WHERE a.chsid=c.chsid and UPPER(c.Close_RecvdJobTraining)='Y' and c.Start_Date > NULL and c. Start_Date < NULL and c.Close_Date > NULL and c. Close_Date < NULL ) AS B,
(SELECT COUNT(*) FROM tblMaster a, tblCODE c WHERE a.chsid=c.chsid and UPPER(c.Close_OffPublicAssistance)='YES' and c. Start_Date > NULL and c.Setup_ Start_Date < NULL and c. Close_Date > NULL and c. Close_Date < NULL ) AS C
FROM xsystbl_SYSPARMS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
chapmandew:
It worked great but what did I do wrong?
I don't see it please forgive my slow uptake.
Thanks very much.
It worked great but what did I do wrong?
I don't see it please forgive my slow uptake.
Thanks very much.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks very much
welcome
ASKER
I thought I closed this thread.
Sorry guys.
Again, thanks a lot BrandonGalderisi: and chapmandew:
Any of your solutions would have worked for me.
Sorry guys.
Again, thanks a lot BrandonGalderisi: and chapmandew:
Any of your solutions would have worked for me.
(SELECT COUNT(*)FROM tblMaster a,tblCODE c WHERE a.chsid=c.chsid and (c.Close_EmployedWhenRelea
(SELECT COUNT(*) FROM tblMaster a, tblCODE c WHERE a.chsid=c.chsid and UPPER(c.Close_RecvdJobTrai
(SELECT COUNT(*) FROM tblMaster a, tblCODE c WHERE a.chsid=c.chsid and UPPER(c.Close_OffPublicAss
FROM xsystbl_SYSPARMS