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 |
|
rgiannone
Starting Member
3 Posts |
Posted - 2004-01-22 : 15:22:03
|
| The code below gives me an Error 156: Incorrect Syntax near the keyword 'SELECT'.Any assistance is greatly appreciated.Thank you.INSERT INTO [program_management].[dbo].[ecr_evaluations] ( [ecr_id], [user_id], [affected_item], [state], [user_id1], [time_stamp]) VALUES SELECT @ecrid, user_id, affected_item, 'Evaluate', @user_id1, @time_stamp FROM mt_program_ecr_evaluators WHERE program_id = @program_id AND all_ecrs = 'Yes' |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-01-22 : 15:36:08
|
| Remove the word VALUES. You do not use VALUES when you provide a SELECT statement for the INSERT. Read up on INSERT INTO in SQL Server Books Online for more information.Tara |
 |
|
|
rgiannone
Starting Member
3 Posts |
Posted - 2004-01-22 : 16:02:29
|
Tara,Thank you very much for your assistance!!! Rob |
 |
|
|
|
|
|