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...
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center