| Author |
Topic |
|
gnaus
Starting Member
41 Posts |
Posted - 2011-09-16 : 08:17:54
|
| Dear reader,I want to insert some records from a table to another existing table. Problem is that de two tables are on different servers.I don't know how to mention my servername correct.this is what I have now: insert EigOpmIndicatieEnClientNrQzorgselect * from ABFKKB01.Intellaacit.AGENKA.gnaus.EigOpmIndicatieEnClientNrQzorgresult: Msg 117, Level 15, State 1, Line 2The object name 'ABFKKB01.Intellaacit.AGENKA.gnaus.EigOpmIndicatieEnClientNrQzorg' contains more than the maximum number of prefixes. The maximum is 3.This the table name (it's a view really):AGENKA\gnaus.EigOpmIndicatieEnClientNrQzorg(and that's the way the name shows itself in the list with views)ABFKKB01 =servernameIntellaacit=Database-namewhen I omit AGENKA\gnaushe says: Msg 208, Level 16, State 1, Line 1Invalid object name 'ABFPDB01.Intellact.EigOpmIndicatieEnClientNrQzorg'.does somebody know how to do this?thank you!GN |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
gnaus
Starting Member
41 Posts |
Posted - 2011-09-16 : 08:27:29
|
| yes I haveGN |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-09-16 : 10:19:44
|
| [ABFKKB01].[Intellaacit].[AGENKA/gnaus].EigOpmIndicatieEnClientNrQzorgJimEveryday I learn something that somebody else already knew |
 |
|
|
gnaus
Starting Member
41 Posts |
Posted - 2011-09-16 : 10:28:42
|
| Thank you both. Jimf, you're almost there... ;-), but unfortunately he still can't find the view (but if you notice the error-message: I think the server, database and schema-notation is good now!)Msg 208, Level 16, State 1, Line 1Invalid object name 'EigOpmIndicatieEnClientNrQzorg'.GN |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-09-16 : 10:44:46
|
| Are you trying to insert locally? Seems the table you're inserting into doesn't exist. Or you need to qualify it with the schema name. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-09-16 : 11:14:13
|
| It's the INSERT portion that's still broken, not the SELECT."Invalid object name" refers to the local server.If it was the lined server, the error message would be "...lined server does not contain the table..." |
 |
|
|
gnaus
Starting Member
41 Posts |
Posted - 2011-09-16 : 16:53:44
|
| you're totally right I was confused en placed the wrong table at the insert. he works now, but only I have to search a solution for the time stam. If I can't I'll post a message again. thank you (all) very much!btw, this is it now:insert [ABFTDB01].[ABR_NAV50SP1_TST_GOOF].dbo.Oefenomgeving$OpmerkingenIndicatieselect * from [ABFPKK01].[Intellaacit].[AGENKA\gnaus].EigOpmIndicatieEnClientNrQzorgMsg 273, Level 16, State 1, Line 1Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column.GN |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-09-16 : 17:57:49
|
| Great. The new error message is pretty self-explanatory. |
 |
|
|
|