Author |
Topic |
new_developer
Starting Member
18 Posts |
Posted - 2012-03-25 : 06:56:26
|
I have problem with this statementselect ([NotID],[NotDate],[DeptID],[ExtNum],[OfficeNum],[FloorNum],[SuiteID],[SectionID],[MachineTypeID],[MachineSerial],[ProblemDesc],[TimeToFinishIDD],[FinishDate],[FinishTime],[EmpCivilID],[TimeToFinishH],[EmpPermision],[Status_order],[Emp_name],[User_name],[Emp_ID],[ResEmpName]) from [Not],[Res] where status=0 and Res.UserID=Not.Emp_IDerror message is Incorrect syntax near ','.any one can help me |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-03-25 : 08:04:31
|
Remove the brackets around the select list. Also, Not is a reserved keyword, so escape it with square brackets.SELECT [NotID], [NotDate], [DeptID], [ExtNum], [OfficeNum], [FloorNum], [SuiteID], [SectionID], [MachineTypeID], [MachineSerial], [ProblemDesc], [TimeToFinishIDD], [FinishDate], [FinishTime], [EmpCivilID], [TimeToFinishH], [EmpPermision], [Status_order], [Emp_name], [User_name], [Emp_ID], [ResEmpName] FROM [Not], [Res]WHERE STATUS = 0 AND Res.UserID = [Not].Emp_ID |
 |
|
|
|
|