Results 1 to 2 of 2

Thread: Sybase IQ query

  1. #1
    Join Date
    Jun 2012
    Posts
    1

    Unanswered: Sybase IQ query

    Hi All,
    I get to know from the sybase IQ technical docs that there are no direct equivalent of ASE sp_depends in IQ. However, it says that there is detailed info available in SYSTABLE and SYSCOLUMN. Could anyone please let me know if there is any query or option to retrieve the dependent objects of IQ Stored Procs?

    Please give me your valuable inputs!!!

    Thanks.

  2. #2
    Join Date
    Jul 2012
    Posts
    1
    Quote Originally Posted by Arsohoh View Post
    Hi All,
    I get to know from the sybase IQ technical docs that there are no direct equivalent of ASE sp_depends in IQ. However, it says that there is detailed info available in SYSTABLE and SYSCOLUMN. Could anyone please let me know if there is any query or option to retrieve the dependent objects of IQ Stored Procs?

    Please give me your valuable inputs!!!

    Thanks.

    Hope this will help you...

    WITH stored_procedures AS (
    SELECT
    o.name AS proc_name, oo.name AS table_name,
    ROW_NUMBER() OVER(partition by o.name,oo.name ORDER BY o.name,oo.name) AS row
    FROM sysdepends d
    INNER JOIN sysobjects o ON o.id=d.id
    INNER JOIN sysobjects oo ON oo.id=d.depid
    WHERE o.xtype = 'P')
    SELECT proc_name, table_name FROM stored_procedures
    WHERE row = 1 AND proc_name = '<<proc_name>>'
    ORDER BY proc_name,table_name

Posting Permissions

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