VB SQL Syntax - PLEASE HELP
Can someone please tell me why I keep getting this error when running this sql statement:
Invalid syntax near '.'.
SQL1 = "SELECT dbo.PAYROLLDB_EMP.ENAME, dbo.PAYROLLDB_EMP.DEPARTMENT, dbo.PAYROLLDB_JBDES.DESCRIPT" & _
"FROM dbo.PAYROLLDB_EMP INNER JOIN dbo.PAYROLLDB_JBDES ON SUBSTRING(dbo.PAYROLLDB_EMP.CURPOS,6,5) = SUBSTRING(dbo.PAYROLLDB_JBDES.JOBNUM,5)" & _
"WHERE [DEPARTMENT] = " & Depts.Text
i am only guessing here, but shouldn't it be spaced a bit?
(otherwise it's just a long word, as in - dbo.PAYROLLDB_JBDES.DESCRIPTFROM)
my knowledge in syntax is very limited can't help you more than that
If the above doesn't help, repost your command string in this thread with the command encased in CODE tags so it's formated correctly for us to view...
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL