Maximum number of prefixes

  • Hi everyone, my user is trying to run this statement and getts the following error. Any idea what I should be doing? Thanks in advance.

    select *

    into dplads01.earthlink.dbo.PPC_2lists

    from dplads03.peoplepc.dbo.PPCMP200302

    where list in ('0099', '0157')

    go

    Server: Msg 117, Level 15, State 1, Line 3

    The object name 'dplads01.earthlink.dbo.' contains more than the maximum number of prefixes. The maximum is 2.

  • Yes. The max number of prefixes are 2 as follows:

    select * from database.user.object

    I guess in your case, peoplepc is the user, in that case, you should not use dbo again.

    If not, please let us know what are dplads01, dplads03, peoplepc, PPC_2lists, PPCMP200302 in your statement.

    Hope this Helps!!!

    .

  • Sorry, I should have specified what is what. DPLADS01/DPLADS03 are the names of the servers. PEOPLEPC and EARTHLINK are the databases on each server. I hope this helps. Thank you.

  • Thats fine. To my understanding you <b>cannot</b> specify Server names in <b>SELECT statement</b>. Anyone please correct me if I am worng.

    .

  • I ran into same scenario few weeks back. I checked Books Online as well. We cannot specify Server Names in SELECT statement.

    .

  • I think you can use the server name in the select if you have a linked server, I just tried it and it worked. If you can use it in the INTO part of the SELECT statement, is another story. Anyone know?

  • After linked server setup and table PPC_2lists created, you can use

    insert into dplads01.earthlink.dbo.PPC_2lists

    select * from dplads03.peoplepc.dbo.PPCMP200302

    where list in ('0099', '0157')

  • hi!

    select into is an implicit DDL statement (it creates a table).

    DDL statements are not possible to be executed on a linked server (try eg. create table, truncate table).

    best regards,

    chris.

    Edited by - cneuhold on 04/14/2003 01:50:49 AM

  • cneuhold,

    Please try it.

  • quote:


    cneuhold,

    Please try it.


    sorry, you're absolutely right ... in my posting i meant to write "SELECT into" 🙂

    for sure "insert into" is NOT an implicit DDL ...

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply