wademi
asked on
Problems inserting records in a SQL Table
I am using the following command to insert records in a table:
insert into grel01.falcon.dbo.job_ext( select * from tsdaft.falcon.dbo.job_ext where id > 140213)
I keep getting the following error:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'select'.
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near ')'.
The query seems perfectly fine
insert into grel01.falcon.dbo.job_ext(
I keep getting the following error:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'select'.
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near ')'.
The query seems perfectly fine
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You are the best. THANKS
jimhorn, I completely agree.
(1) Your database name is grel01.falcon, correct?
(2) It's widely considered proper design to INSERT specifying all columns, and not with the all-columns asterisk (*).