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 |
|
swathigardas
Posting Yak Master
149 Posts |
Posted - 2008-08-29 : 09:06:02
|
| create table one (id int)create table two (id int, name varchar(20)insert into two (id, name)valuesselect id from dbo.one where id=2,'abc'when i'm trying to insert values in the table 'two'with the help of above query it is showing the followin errorMsg 156, Level 15, State 1, Line 4Incorrect syntax near the keyword 'select'.Msg 102, Level 15, State 1, Line 4Incorrect syntax near ','.Can anyone help me on this |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-08-29 : 09:11:37
|
insert into two (id, name)select id, 'abc' from dbo.onewhere id=2 E 12°55'05.63"N 56°04'39.26" |
 |
|
|
haribabu.rk
Starting Member
2 Posts |
Posted - 2008-08-30 : 00:49:22
|
| create table one (id int)INSERT INTO one select 2create table two (id int, name varchar(20))insert into two select id,'abc' from one where id=2try this. |
 |
|
|
|
|
|