Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2009
    Posts
    2

    Unanswered: Insert Location Sybase IQ

    I need to load tables from Sybase ASE to Sybase IQ via insert location. Everything is working fine except that it is getting hard to manage different names of server in the insert location script.

    For eg:

    i am using

    insert table1
    location 'ase_servername.database_name'
    {select...}
    go

    if i need to change the source from 'ase_servername.database_name' to say
    'ase_servername1.database_name1'..i am having to change every single file..

    Is there a way to calla function in the
    insert tablename
    location 'function'
    so that i just give the sername and database name only once at runtime.

    Any comments/help appreciated.

    -N

  2. #2
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Quote Originally Posted by naveedm
    I need to load tables from Sybase ASE to Sybase IQ via insert location. Everything is working fine except that it is getting hard to manage different names of server in the insert location script.

    For eg:

    i am using

    insert table1
    location 'ase_servername.database_name'
    {select...}
    go

    if i need to change the source from 'ase_servername.database_name' to say
    'ase_servername1.database_name1'..i am having to change every single file..

    Is there a way to calla function in the
    insert tablename
    location 'function'
    so that i just give the sername and database name only once at runtime.

    Any comments/help appreciated.

    -N
    Not that I can think of, but you could achieve this in a simple shell script also.

  3. #3
    Join Date
    Dec 2007
    Posts
    7

    Dynamic SQL

    Or you could use dynamic SQL and concatenate the changing server name into the clause. Then execute it with EXECUTE IMMEDIATE syntax.

Posting Permissions

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