| Author |
Topic |
|
kdnichols
Posting Yak Master
232 Posts |
Posted - 2007-02-14 : 15:10:07
|
Hello,I keep getting the following error message:Msg 102, Level 15, State 1, Line 4Incorrect syntax near 'Div'.I have tried putting in a , at the end and a semi colon.Here is the code Use QAgentINSERT INTO AgentInfo(SYSTEM, PRIN, FIRSTNAME, LASTNAME, REP#, MANAGER, EID_VID, Email, AccessLevel)(Div, All, Curt, Logan, , E057803, ' ', E067892, curtis.logan@twcable.com, PAC) I know this is easy and I will probably feel stupid afterward, but what am I doing wrong?Thanks,kurt |
|
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-02-14 : 15:14:03
|
| First of all, column names can't contain a #, so you'll need to put that column in [], and your values all look like character literals so they need to be in quotes, like thisINSERT INTO AgentInfo(SYSTEM, PRIN, FIRSTNAME, LASTNAME, [REP#], MANAGER, EID_VID, Email, AccessLevel)('Div', 'All', 'Curt', 'Logan', , 'E057803', ' ', 'E067892', 'curtis.logan@twcable.com', 'PAC') |
 |
|
|
kdnichols
Posting Yak Master
232 Posts |
Posted - 2007-02-14 : 15:55:10
|
Hello SNSQL,Thanks one more thing you must put values in front of the statement and have the INSERT INTO for every record, but I was able to get it done.It should be like this:Use QAgentINSERT INTO AgentInfo(SYSTEM, PRIN, FIRSTNAME, LASTNAME, REP#, MANAGER, EID_VID, Email, AccessLevel)VALUES (Div, All, Curt, Logan, , E057803, ' ', E067892, curtis.logan@twcable.com, PAC) Thanks for the info.Have a great day! Kurt |
 |
|
|
|
|
|