Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    2

    Unanswered: Passing server name to stored procedure

    Hi,

    I have following stored procedure:
    SELECT
    ...
    FROM databasename@servername:tablename
    WHERE
    ...

    In my case I need to pass servername as parameter and use that parameter in FROM statement.
    Is it possible? If it is then what should be a syntax of FROM statement?

    Thanks,
    Victor

  2. #2
    Join Date
    Apr 2003
    Location
    Phoenix, AZ
    Posts
    177
    You are talking dynamic SQL - which is not supported. There are some work-arounds, but none are elegant.
    Fred Prose

  3. #3
    Join Date
    Jul 2003
    Location
    Beijing China
    Posts
    36
    Use prepare sql of ESQL and 4GL
    MSN:jianghua1213@hotmail.com
    Beijing China
    http://www.91talk.net
    http://www.91talk.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •