This discussion is archived
10 Replies Latest reply: Jan 17, 2013 5:19 AM by 945927 RSS

how to refresh second varible in package

945927 Newbie
Currently Being Moderated
Hi All,

I created to variables Var1 ,Var2 with different refreshing queries,now i am using these variables in package for giving inputs to procedure,drag both the variables in package and set as declare variables and once aging drag both the variables set as refresh variables and connected to procedure,generated a scenario execute the package ,my package was executing successfully but second variable Var2 was not refreshing only first variable will refreshing,how should i refresh second variable also?Any suggestions are appreciated,
  • 1. Re: how to refresh second varible in package
    PeakIndicators_Alastair Guru
    Currently Being Moderated
    Hi - How do you know its not refreshing as such?
    Does operator show the refresh step (probably step #4) ?
    Are you trying to pass the variable to the procedure?
  • 2. Re: how to refresh second varible in package
    945927 Newbie
    Currently Being Moderated
    Hi Thank you for reply

    1)How do you know its not refreshing as such?

    when i check history the no value is displayed

    Does operator show the refresh step (probably step #4) ?

    i checked refresh value in variable ------history

    Are you trying to pass the variable to the procedure?

    i did not pass the variable i just passing the refreshing value

    for example ,below query i used in procedure
    create table dept as select empno, name from emp where empno=#Var1 and name=#var2
  • 3. Re: how to refresh second varible in package
    Bhabani Ranjan Guru
    Currently Being Moderated
    what are the queries you have used in your refresh variables ??

    Might be your second refresh query is not returning anything.

    When you are using these variables in procedure use single quote around the variable like below

    create table dept as select empno, name from emp where empno= '#Var1' and name='#var2'

    Bhabani
    http://dwteam.in
  • 4. Re: how to refresh second varible in package
    A. Drieux Pro
    Currently Being Moderated
    Except the history issue, are you sure the variable is not really refreshed ?
    I mean, does your procedure do the right job with right values

    In your var2 design, is the action value set to "historize" or "last value" or "non persistant" ? In "non persistent" mode, the value is not historized into the repository (but the variable still works inside the package).

    To check if your variable is really used, you can do a little test :
    - in your package, after refreshing variable2, add the variable again and set it to "evaluate". If you know that the real value is supposed to be "2" (for example), evaluate the variable with a "= 2" statement. If true, display something (like an odi sleep renamed in "2" for instance). If true, display other thing (like anoter odi sleep renamed in "not 2").
  • 5. Re: how to refresh second varible in package
    945927 Newbie
    Currently Being Moderated
    Hi ,Thank you for reply

    what are the queries you have used in your refresh variables ??

    for variable1---SELECT     CASE  WHEN '#Var1' IS NOT NULL THEN '0'||'#Var1' END FROM DUAL

    for variable2---SELECT     CASE  WHEN '#Var2' IS NOT NULL THEN '0'||'#Var2' END FROM DUAL


    Might be your second refresh query is not returning anything.

    no,when change the starting variable in package as Var2 its working but second variable in package Var1 is not refreshing

    When you are using these variables in procedure use single quote around the variable like below

    create table dept as select empno, name from emp where empno= '#Var1' and name='#var2'

    yes,i am using in single quotes only,i did not have any problem with my procedure,my procedure executing successfully

    Edited by: 30021986 on Jan 17, 2013 4:03 PM
  • 6. Re: how to refresh second varible in package
    945927 Newbie
    Currently Being Moderated
    Hi Thank you for reply

    Except the history issue, are you sure the variable is not really refreshed ?
    I mean, does your procedure do the right job with right values
    yes ,the procedure executing successfully with right values,except variable refreshing

    In your var2 design, is the action value set to "historize" or "last value" or "non persistant" ? In "non persistent" mode, the value is not historized into the repository (but the variable still works inside the package).

    --last value for both variables*

    To check if your variable is really used, you can do a little test :
    - in your package, after refreshing variable2, add the variable again and set it to "evaluate". If you know that the real value is supposed to be "2" (for example), evaluate the variable with a "= 2" statement. If true, display something (like an odi sleep renamed in "2" for instance). If true, display other thing (like anoter odi sleep renamed in "not 2").

    i did small test i created a table loaclly with values like 1 and 01 ,i tested but i return the 1 values

    i clearly  observed one thing in package what ever the first input variable  that variable only refreshed second variable not refreshing for example if drag and drop Var1 as first in package these variable was refreshing but not Var2,if i drag and drop Var2 as first in package Var2 is refreshing,but not Var1
  • 7. Re: how to refresh second varible in package
    Bhabani Ranjan Guru
    Currently Being Moderated
    Ok it seems to be a minor issue. There is something missing.

    I will consider that you are hitting the enter button in your keyboard for second variable at the time of supplying value.

    Please ping me to discuss and at the end we can post the conclusion here.
  • 8. Re: how to refresh second varible in package
    945927 Newbie
    Currently Being Moderated
    Hi Bhabani,Thank you for your reply

    i did not missing any thing please you can test same process it will take only 5 to 10 minutes,i am unable to ping now,i dont have access
  • 9. Re: how to refresh second varible in package
    Bhabani Ranjan Guru
    Currently Being Moderated
    hmm, let me give you a solid proof

    http://dwteam.in/wp-content/uploads/2013/01/otn1.jpg

    Thanks
  • 10. Re: how to refresh second varible in package
    945927 Newbie
    Currently Being Moderated
    Hi Bhabani,Thank you for reply,Its working fine,i taken various inputs into various flows after refresh club into procedure thats why my variable does not refresh,your taken single flow,now i understand,Any how thanks for your reply once agian

    Edited by: 30021986 on Jan 17, 2013 6:49 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points