Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Posts
    63

    Unanswered: generate procedure ddl

    I have a procedure written in ver 7.2. How do I retrieve the ddl of the procedure?

    Thanks,
    Toby

  2. #2
    Join Date
    Dec 2002
    Posts
    134

    Re: generate procedure ddl

    select text from syscat.procedures
    where procschema = '...' and procname = '...' and specificname = '...'

  3. #3
    Join Date
    Sep 2003
    Posts
    63

    Re: generate procedure ddl

    Originally posted by chuzhoi
    select text from syscat.procedures
    where procschema = '...' and procname = '...' and specificname = '...'
    Its a text field. So I am not getting the ddl out of it using that SQL. Any other way can retrienve the CREATE PROC DDL?

  4. #4
    Join Date
    Dec 2002
    Posts
    134

    Re: generate procedure ddl

    Originally posted by toby25
    Its a text field. So I am not getting the ddl out of it using that SQL. Any other way can retrienve the CREATE PROC DDL?
    I do not understand your question. I've just checked my SQL stored procedure and the first line "text" field has
    CREATE PROCEDURE ....
    I can just copy and paste this text to a command center and recreate the proc.

    Are you talking about some other type of the stored procedures, not SQL?

  5. #5
    Join Date
    Sep 2003
    Posts
    63

    Re: generate procedure ddl

    Originally posted by toby25
    Its a text field. So I am not getting the ddl out of it using that SQL. Any other way can retrienve the CREATE PROC DDL?

    got it now. I didn't know that the procname column is case sensitive.

    Thanks for the help.

  6. #6
    Join Date
    Dec 2002
    Posts
    134

    Re: generate procedure ddl

    Originally posted by toby25
    got it now. I didn't know that the procname column is case sensitive.

    Thanks for the help.
    All object names in DB2 are automatically uppercased upon creation, unless you use double quotes

Posting Permissions

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