Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2014
    Posts
    294

    Unanswered: Runtime parameters for procedures using global temporary tables

    Hi,

    I have written some procedures using global temporary tables & there is an Input parameter for this procedure. I am using IBM data studio for this. My question is I can compile my procedure & while I am calling It is not asking any parameters for running. It is running directly with out taking any input parameters.

    CREATE or REPLACE PROCEDURE TM1 (IN COMMIT_COUNT INTEGER)
    ---
    ---
    --
    DECLARE GLOBAL TEMPORARY TABLE TEMP3(
    TABLE_ID INTEGER,
    TABLE_NAME VARCHAR(100),
    COL_NAME VARCHAR(1000)) on commit delete rows IN MENTIS_TBSPACE WITH REPLACE;
    ---
    ----

    Kindly let me know whether I need to add any thing else while calling my procedure that is having runtime parameters.

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    could you rephrase the question and some details and the purpose.. as it is not very clear : what/why.. the complete code - the error you get
    and of course the platform and level as it always should be specified..
    with one sentence of description nobody can guess what you have in mind...
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jul 2014
    Posts
    294
    Sure.I am running db2 c express on windows platform & using IBM data studio for compilation & execution.
    CREATE or REPLACE PROCEDURE TM1 (IN COMMIT_COUNT INTEGER)
    this is my procedure statement. It got compiled. As i said previously I am using some global temporary tables inside my procedure. I am trying to supply an input value to this procedure.for normal procedures with input parameters(with out global temporary tables) ,when i am running them,a separate window will be prompted for entering this run-time value.

    There is no error in this case. My problem is when i am trying to run , this procedure, it is not prompting for any input parameter & it is running. I don't know which default value it is taking for as an input value for COMMIT_COUNT

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    in call tm1(xxxx)
    parameters are positional as defined in create proc
    no default if not defined
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

Tags for this Thread

Posting Permissions

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