| Author |
Topic |
|
luismgh
Starting Member
5 Posts |
Posted - 2011-04-07 : 07:13:05
|
| Hi! I'me a newby at SQL language and i'm trying to copy the contents of one table to another.The destination table already exists and have the same structure of the source table.The script is:INSERT INTO CLH_DESDUPLICACAOLOG_HISTORICO (Id, Query, Tabela, Ficheiro, EntidadeAgregada, EntidadeSobrevivente, MoradaAgregada, MoradaSobrevivente, Tipo, DataFicheiro)SELECT (Id, Query, Tabela, Ficheiro, EntidadeAgregada, EntidadeSobrevivente, MoradaAgregada, MoradaSobrevivente, Tipo, DataFicheiro)FROM CLH_DESDUPLICACAOLOGAnd the error returned by SQL is:Msg 170, Level 15, State 1, Line 3Line 3: Incorrect syntax near ','.Can anyone help me with this issue?Thank you in advance! |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-04-07 : 07:16:41
|
Take away the parentheses in the SELECT part.quote: Originally posted by luismgh Hi! I'me a newby at SQL language and i'm trying to copy the contents of one table to another.The destination table already exists and have the same structure of the source table.The script is:INSERT INTO CLH_DESDUPLICACAOLOG_HISTORICO (Id, Query, Tabela, Ficheiro, EntidadeAgregada, EntidadeSobrevivente, MoradaAgregada, MoradaSobrevivente, Tipo, DataFicheiro)SELECT (Id, Query, Tabela, Ficheiro, EntidadeAgregada, EntidadeSobrevivente, MoradaAgregada, MoradaSobrevivente, Tipo, DataFicheiro)FROM CLH_DESDUPLICACAOLOGAnd the error returned by SQL is:Msg 170, Level 15, State 1, Line 3Line 3: Incorrect syntax near ','.Can anyone help me with this issue?Thank you in advance!
No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
luismgh
Starting Member
5 Posts |
Posted - 2011-04-07 : 07:30:28
|
quote: Originally posted by webfred Take away the parentheses in the SELECT part.quote: Originally posted by luismgh Hi! I'me a newby at SQL language and i'm trying to copy the contents of one table to another.The destination table already exists and have the same structure of the source table.The script is:INSERT INTO CLH_DESDUPLICACAOLOG_HISTORICO (Id, Query, Tabela, Ficheiro, EntidadeAgregada, EntidadeSobrevivente, MoradaAgregada, MoradaSobrevivente, Tipo, DataFicheiro)SELECT (Id, Query, Tabela, Ficheiro, EntidadeAgregada, EntidadeSobrevivente, MoradaAgregada, MoradaSobrevivente, Tipo, DataFicheiro)FROM CLH_DESDUPLICACAOLOGAnd the error returned by SQL is:Msg 170, Level 15, State 1, Line 3Line 3: Incorrect syntax near ','.Can anyone help me with this issue?Thank you in advance!
No, you're never too old to Yak'n'Roll if you're too young to die.
Thanks, It worked!Regards, |
 |
|
|
|
|
|