#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Philadephia
    Posts
    16
    Rep Power
    0

    Maximum number of prefixes exceeded


    Good morning, I am getting the above error from the following query...any ideas

    select accountid,c_acct_engagementID,client_code,engagement,ltrim(rtrim(client_code)) + ltrim(rtrim(engagement)) as
    EngCode from saleslogix.sysdba.c_acct_Engagement B

    where
    ltrim(rtrim(B.Client_Code)) + ltrim(rtrim(B.Engagement))
    not in (select ltrim(rtrim([rl-sql02].abc_sql.dbo.clients.cltnum)) + ltrim(rtrim([rl-sql02].abc_sql.dbo.clients.clteng))
    from [rl-sql02].abc_sql.dbo.clients)

    --------------------------------------------------------------

    Server: Msg 117, Level 15, State 2, Line 6
    The number name 'rl-sql02.abc_sql.dbo.clients' contains more than the maximum number of prefixes. The maximum is 3.
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,172
    Rep Power
    4274
    Originally Posted by bholmstrom
    ...any ideas
    only after you explain what each of the following means --

    [rl-sql02]
    abc_sql
    dbo
    clients
    cltnum

    i'll give you a hint -- the last one is a column name, and the one before that is a table name

    now, what about the others?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    114
    Rep Power
    9
    Are you using linked servers and query linked server database?

IMN logo majestic logo threadwatch logo seochat tools logo