Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
youruseridistoxic
Yak Posting Veteran
65 Posts |
Posted - 2009-04-23 : 11:35:29
|
Hello,When I execute the following statement in a query window, the operation works fine;insert into users ("User_ID")SELECT user_idFROM zz_userlist However if I run it as part of a job, the job fails and the following error reported;Invalid Column name 'User_ID'. [SQLSTATE 42S22] (Error 207). The step failed.I have confirmed the job IS running against the proper database, so its not like I'm referencing the wrong table.Has anyone encountered this before, and perhaps have a suggestion on how to resolve it?Thank you! |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-04-23 : 11:54:39
|
Try :insert into users ([User_ID])SELECT [user_id]FROM zz_userlist Because user_id is a system function to get the userid of a database user No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
youruseridistoxic
Yak Posting Veteran
65 Posts |
Posted - 2009-04-23 : 13:20:26
|
quote: Originally posted by webfred Try :insert into users ([User_ID])SELECT [user_id]FROM zz_userlist Because user_id is a system function to get the userid of a database user No, you're never too old to Yak'n'Roll if you're too young to die.
Worked like a charm. Thank you very much! |
|
|
|
|
|