How do I manipulate process variables within sql?

Hi,
I am working with Oracle 10gR2.
my main problem is to indicate a problem within the execution of a SQLPLUS.
I saw in this forum that there is a bug and the return code will be ignored.
So it was suggested:
As a workaround you can define processflow variable and bind RESULT_CODE parameter of Sql*plus activity to this variable. Then you can define transition from
sqlplus activity with custom ("complex") condition (like PF_VAR_RC=2 etc.).What exactly shall this mean?
I am now on the way to solve this by manipulating the process variable within SQLPLUS. But how can I access this variable and manipulate it within PLSQL?
Many thanks
cheers Daniel

Hi Daniel,
even with this "bug" it is possible to get result of execution SQL*Plus activity:
- SQL*Plus command exit 0 produce SUCCESS return code in SQL*Plus activity
- SQL*Plus command exit 1 (or with other non zero value) produce FAILURE return code in SQL*Plus activity
Regards,
Oleg

Similar Messages

  • How do I use a variable within a sql statement

    I am trying to use a local variable within an open SQL step but I keep getting an error.
    My sql command looks like this "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  locals.CurrentSerialNo
    If I replace the locals.CurrentSerialNo with an actual value such as below the statement works fine.
    "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  " 'ABC001' " 
    Can someone tell me how to correctly format the statement to use a variable?

    Hi,
    Thanks for the reply. I have changed the required variable to a string, but with no success. I have reattached my updated sequence file and an image of the error.
    When looking at the Data operation step I see that the sql statement is missing everything after the last quotation mark.
    Thanks again,
    Stuart
    Attachments:
    Database Test Sequence.seq ‏10 KB
    TestStand error.JPG ‏37 KB

  • How to start/stop process flow from sql*plus?

    Hi,
    i know how to start a process flow via sqlplus_exec_template.sql, but i cannot find any information on how to stop (and rollback) a working flow from sql*plus. Any help would be appreciated.
    Greetings
    Christoph
    Message was edited by:
    ctrierweiler

    Hi,
    I've had a go.
    How should I interpret the results of list_requests:
    owner_owr@ORKDEV01> @list_requests
    ====================
    DEPLOYMENTS
    ====================
    Audit ID Status Name Date Owner
    2706 READY Deployment Fri Nov 11-NOV-05 10:49:59 OWNER_OWR
    11 10:46:37 CET 2
    005
    ====================
    DEPLOYMENT UNITS
    ====================
    Audit ID Status Name Date Owner
    2707 READY Unit0 11-NOV-05 10:49:59 OWNER_OWR
    ====================
    EXECUTIONS
    ====================
    Er zijn geen rijen geselecteerd.
    owner_owr@ORKDEV01>
    Whilst a process flow is executing the last query will list executions, all of which have status BUSY:
    owner_owr@ORKDEV01> @list_requests
    ====================
    DEPLOYMENTS
    ====================
    Audit ID Status Name Date Owner
    2706 READY Deployment Fri Nov 11-NOV-05 10:49:59 OWNER_OWR
    11 10:46:37 CET 2
    005
    ====================
    DEPLOYMENT UNITS
    ====================
    Audit ID Status Name Date Owner
    2707 READY Unit0 11-NOV-05 10:49:59 OWNER_OWR
    ====================
    EXECUTIONS
    ====================
    Audit ID Status Name Date Owner
    394512 BUSY PF_ONB01 04-MEI-06 09:11:12 OWNER_OWX
    395328 BUSY ONB:FULL_PREPARE 04-MEI-06 09:11:55 OWNER_OWR
    395324 BUSY PF_ONB01:ONB 04-MEI-06 09:11:55 OWNER_OWR
    owner_owr@ORKDEV01>
    As an aside, I will attempt to get rid of the READY deployment and deployment unit using deactive_deployment.sql
    Now, if I attempt to use deactivate_execution.sql on any of the executions with status BUSY I get:
    owner_owr@ORKDEV01> @deactivate_execution
    Voer waarde voor 1 in: 396136
    declare
    FOUT in regel 1:
    .ORA-20003: The object is not in a valid state for the requested operation
    ORA-06512: at "OWNER_OWR.WB_RTI_EXCEPTIONS", line 94
    ORA-06512: at "OWNER_OWR.WB_RTI_EXECUTION", line 774
    ORA-06512: at "OWNER_OWR.WB_RT_EXECUTION", line 90
    ORA-06512: at line 4
    owner_owr@ORKDEV01>
    So all the seems to remain is to use abort_exec_request.sql
    This does the job, but the script itself hangs.
    I think it has to do with the l_stream_id not being checked again after the initial IF. I think it should probably be part of the loop condition as it is again reset in the do_acks inside the loop.
    Cheers & thanks,
    Colin

  • Script logic - how to use a selection variable within an allocation logic

    Hi,
    I want to implement a simple top-down distribution to distribute values from a yearly budget (Y20xx.TOTAL) to a quarter budget (Q20xx.Q1, ... Q20xx.Q4) using the actuals of the previous year as reference.
    If we hard code the members it works fine:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=SBO; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    Of course, we want to make this dynamic, using the values inputted in the selection screen of the package: time, entity and category.
    So if we start with write the following logic, it does not work anymore:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=%TIME_DIM%; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=%CATEGORY_DIM%; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    So, how to use the selection variables in this allocation logic? %TIME%, %CATEGORY% also did not work ...
    regards
    Dries
    solved it ...
    Edited by: Dries Paesmans on Feb 22, 2009 8:31 PM

    Hi Dries,
    Looks like you solved this, but if I can just add a small point -- when you use syntax like this:
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN);
    *DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL);
    each time the logic runs, it will scan through the dimension from the FIN and Q2009.TOTAL members, one level at a time, until it reaches the base members (where calc = 'n'). This may happen very quickly, if the dimension has very few levels, but could take a bit of extra time if it's a particularly deep dimension. (By which I mean many levels of hierarchy -- not some 1970's Pink Floyd musical reference.)
    You may speed things up by using a member property instead of the BAS(xyz). Flag all the base members using a specific property value, and that way the logic engine can pick up the complete list of members in the WHERE clause, in a single query.
    *DIM Account What=ACC_NOT_ASSIGNED; Where=[FloydProperty]="DarkSideOfTheMoon"; ...
    This adds some maitenance work in the dimension, which may be problematic if your admins are changing it regularly (and will cause problems if they forget to update this particular property).
    I can't predict how much time this will save you (maybe not much at all), but anyway I figure you'd want to know exactly what work you're asking the system to perform.
    Regards,
    Tim

  • How to call a session variable into sql?

    for example, I have a coldfusion session variable - session.testvar
    I am writing a Stored procedure in sql server 2000. The query within my stored procedure needs to insert a value into a table. The value needs to be my CF session variable. I have no idea how this is done, does anyone else have a hunch?
    I am using coldfusion 8 and sql server 2000.

    Pass it to the SP as a variable
    - there are examples in the cf docs

  • How do I use a variable within paragraphFormat?

    I would like to insert the firstname of a client within paragrapgFormat(). ie: paragraphFormat(Hi #firstname#, your info......) When I output this the firstname just shows as #firstname#. Is there a way to get his to work?

    The first instance of 'FirstName' is a variable name. Whereas the last instance is a substring within the string defined by getInfo.message. I am assuming that the message you have saved in the database is:
    "Hi"  & FirstName & ",
      We are writing to you to inform you that we received your request to schedule the...
    You could modify the code as follows. Give the queries separate names, say, getUser and getMessage. Omit the columns userID and messID from the respective queries. This is because the where-clauses already specify the values.
    What you could then do is replace the substring "  & FirstName & " in getMessage.message with the variable getUser.FName. The result would be something like
    <!--- grabbing firstname --->
    <CFQUERY Name="getUser" datasource="#application.dsn#">
    SELECT fNname, lName, email, company, phone
    FROM users
    where userID = 1
    </CFQUERY>
    <cfset firstNameString = " " & trim(getUser.fName) & " ">
    <!--- grabbing message --->
    <cfquery name="getMessage" datasource="#application.dsn#">
    select name, message
    from messages
    where messID = 1
    </cfquery>
    <table width="300" cellpadding="0" cellspacing="0" border="1">
    <tr><td>
    <cfoutput query="getMessage">
    <cfset msg = replaceNoCase(message, '"  & FirstName & "', firstNameString)>
    #paragraphFormat(msg)#
    </cfoutput>
    </td></tr>
    </table>
    Having said that, there are still 2 things I fail to understand. Firstly, why loop across the query when there is just one row? Secondly, why do you save a static message in the database when you could just save it in the CFML code as a string variable?

  • How do I set a variable within a 'for' loop grid array

    I'm afraid I'm stuck again!
    The next stage in the animation that I'm working on,  is to set up a boolean, 'drilled = false', so that all instances of the attachMovie ('openCircle') have a boolean 'drilled = false' associated with them. Then when someone clicks on one of the instances of the attachMovie ('openCircle'), the boolean becomes 'drilled = true', but only for that instance that has been clicked.
    What I've done is to set the variable (boolean)(highlighted in bold below) within both 'for' loops within the grid array, but it just returns an undefined value. Do I need to setup a separate array? (see code below):-
    //set up grid for solid array
    var spacing:Number = 5.75;
    var cols:Number = 20; // number of columns in grid
    var rows:Number = 20; // number of rows in grid
    var leftMargin:Number = 154;
    var topMargin:Number = 169;
    var depth:Number = 100; // starting point for depth
    var drilled:Boolean;
    for (i=1; i<=rows; i++) {                                                                                                         
    for (j=1; j<=cols; j++) {                                                                                                                              
              drilled[rows,cols]=false;
                        trace(drilled);
              current = attachMovie("openCircle_mc", "openCircle_mc"+i+"_"+j, depth++);
              current._x = leftMargin + ((i-1) * (spacing + current._width));
              current._y = topMargin + ((j-1) * (spacing + current._height));
              current.row=i;
              current.col=j;
    //          current.oil = Math.floor(Math.random()*1.1);  // about 1/10 objects have oil=1, 9/10 oil=0
              //open circle initially invisible, visible on rollOver
              current._alpha = 0;
              current.onRelease=function(){
                        trace(this.row+" "+this.col);
       current.drilled = true;
              current.onRollOver = function() {
                                     this._alpha = 100;
              current.onRollOut = function() {
                                     this._alpha = 0;
    I'd be grateful for any help. Thanks.

    I'm sorry for asking this question again, but I really need to have the 'drilled' variable to be available at all times outside the openCircle_mc, so if I can set up the 'drilled' variable as an array that would be good. Below is the code that isn't working:
    /*  set all values of 'drilled' to false  */
    var col:Number = 20; // number of columns in grid
    var row:Number = 20; // number of rows in grid
    for (g=1; g<=row; g++) {
              for (h=1; h<=col; h++){
                          drilled[g,h] = false;
    Very many thanks

  • How to calculate a rolling average within SQL Server Compact

    There are at least a dozen ways to skin this cat in regular SQL Server, but I am trying to solve this problem within the limitations of SQL CE. I have a table of stock values:
    Stock, Date, Open, High, Low, Close
    and I want to add 1 column "RollingAVG" which is simply the AVG(Close) over a specified timeframe (say 30 days)
    This code here works in SQL Server 2012 just fine (of course) but I need something that produces the same results in SQL CE.  Any thoughts?  Thanks!
    SELECT b.Symbol,b.DateTrade, b.ValueClose,
    (SELECT
    AVG(a.ValueClose)
    FROM
    HistoryPrice a
    WHERE
    a.DateTrade >= DATEADD(d,-30,b.DateTrade)
    AND a.DateTrade <= b.DateTrade
    AND a.Symbol = b.Symbol
    ) as Rolling30Close
    (SELECT
    MIN(a.ValueLow)
    FROM
    HistoryPrice a
    WHERE
    a.DateTrade >= DATEADD(d,-30,b.DateTrade)
    AND a.DateTrade <= b.DateTrade
    AND a.Symbol = b.Symbol
    ) as Min30Day
    (SELECT
    MAX(a.ValueHigh)
    FROM
    HistoryPrice a
    WHERE
    a.DateTrade >= DATEADD(d,-30,b.DateTrade)
    AND a.DateTrade <= b.DateTrade
    AND a.Symbol = b.Symbol
    ) as Max30Day
    FROM
    HistoryPrice b
    order by Symbol,DateTrade desc
    Shane

    Hi,
    AVG function is supported in SQL Server Compact. However, embedded select clause is not supported in Visual Studio and a SQL Execution error will be thrown out.
    I suggest you optimize your query. You can refer to the below code:
    AVG (SQL Server Compact)
    http://technet.microsoft.com/en-us/library/ms174124.aspx
    If you have any feedback on our support, please click here.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Setting Windows Envirnoment variables within Java code!!

    Hello All,
    How to setup Windows envirnoment variables within Java code dynamically.
    int customer = jList1.getSelectedIndex();
    System.out.println(customer);
    switch (customer)
    case 0:
    System.out.println("HOME1");
    break;
    case 1:
    System.out.println("HOME2");
    break;
    case 2:
    System.out.println("HOME3");
    break;
    case 3:
    System.out.println("HOME4");
    break;
    default:
    System.out.println("HOME5");
    break;
    }

    set windows %HOME% variableWhat is it?
    A system-wide resource? Something pertinent to the processes of a given user? Or does it apply only to your Java process?

  • Accessing a javascript variable within a EL, does anyone ....

    know how to do this.
    I have a variable, say eventid, defined as:
    <SCRIPT>
    var eventid = "GA20045533";
    </SCRIPT>
    and a button defined as:
    <hx:commandExButton >
       <f:param id="param_eventID" name="eventID" value = "#{window.eventid}" ></f:param>
    </hx:commandExButton>but this somehow fails. How can I access this variable within the EL for the param tag??

    if you want to access the variable in the same page at the same time?
    you can't
    if you want to access the variable in other page? wich is called from the form? then you just call the parameter request.getParameter("province")
    the value must be the same that the selected index, otherwise use a hidden input for store the selectedIndex

  • How to change the default directory from within SQL*Plus ?

    Hello,
    I want to change the default directory directly from within SQL*Plus to be able to launch my command files with simple instructions like :
    @my_command.sql
    If I haven't launched SQL*Plus from the directory containing the file my_command.sql, how do I change the default directory to the directory of my command files ?
    I've searched through the Oracle documentation, there's no SET DEFAULTDIR or something like that. When I do a SHOW ALL, there's no variable containing the default directory.
    If you have an idea...
    regards,
    Jérôme.

    Hi Jérôme (J鲴me ?),
    You cannot directly do that, but you can use @@ instead of @ to run subscripts in the same directory as the superscript
    # head /tmp/tl30/xxx/[xyz].sql                    
    ==> /tmp/tl30/xxx/x.sql <==
    prompt call y
    @y
    prompt call z
    @@z
    quit
    ==> /tmp/tl30/xxx/y.sql <==
    prompt i am in y
    ==> /tmp/tl30/xxx/z.sql <==
    prompt i am in z
    # pwd                                             
    /root
    # sqlplus -s scott/tiger@lsc62 @/tmp/tl30/xxx/x.sql
    call y
    SP2-0310: Datei "y.sql" konnte nicht geöffnet werden
    call z
    i am in zKind regards
    Laurent Schneider
    OCM DBA

  • How to insert, as an input variable within formula, the total time window on scope?

    How to insert, as an input variable within formula, the total time window on scope (i.e. 20ms/div x 10 div = 200ms)?
    BELOW IS AN EXAMPLE OF ISSUE:
    FORMULA FOR ACTION INTEGRAL:
    STATISTICS:
    Input variable: DPO4034(CH1);
    Check Box: number of samples.
    FORMULA
    Input variable 0: DPO4034(CH1); alias: x0
    Input variable 1: "Total Time Window on Scope???"; alias: x1
    Input variable 2: Number of Samples (CH1); alias: x2
    Under Operation Setup: Formula
    Y= (x0^2)*(x1/x2)
    Output: Processed Data 1 (CH1)
    THEN USING STATISTICS:
    Input signal: Processed Data 1 (CH1)
    Check Box: SUM
    Output: CH1 Action Integral [A^2s]
    Solved!
    Go to Solution.

    Hi again Catherine,
    I have now added another TekScope (TDS3032B) along with the DPO4034 and run the same work-around on the TDS3032B using CH1 as the "real" signal channel and CH2 as the "burst width" channel. However, the value returned for CH2 is nominally 99E+36 (min 99E+36, max 99E+36) with very few retrievals of correct burst width (~200ms). Seems the SignalExpress program is unable to consistently retrieve from TDS3032B the actual burst width (scope's time scale/window) and defaults to 99E+36 value. Any ideas on what is occurring and how to make it work? Attached are some screen captures to help guide discussion.
    Regards,
    Michael
    Attachments:
    TDS3032B - incorrect burst width.png ‏301 KB
    TDS3032B - correct burst width.png ‏287 KB
    DPO4034 - always correct burst width.png ‏302 KB

  • How can I set a variable number of values in a SQL IN clause?

    Hi,
    How can I set a variable number of values in a SQL IN clause without having to change the text of the SQL statement each time?
    I read the link http://radio.weblogs.com/0118231/2003/06/18.html. as steve wrote.
    SELECT *
    FROM EMP
    WHERE ENAME IN (?)
    But we need the steps not to create type in the system and would there be any other solution if we would like to use variable number of values in a SQL IN clause ?
    We are using JDeveloper 10.1.3.2 with Oracle Database 10.1.3.2
    Thanks
    Raj

    Hi,
    can you please explain why the solution from steve is not the right solution for you.
    regards
    Peter

  • How to get value of process variable in another flex form

    Hi,
    currently we are using Flex 3 for form development in LiveCycle ES workspace.
    We have got an "Assign Task" service operation. This service operation has got a process variable defined for "input" and "output".
    The service will be called in a flex form. When the process is called a task will be sent to a user.
    When the user opens this task another flex form will be opened. All these steps work fine!
    How it's possible to get the value of the defined process variable from the first flex form (which starts the process)
    to the flex form which will be displayed when the user opens the task?
    Thanks very much for your help!
    Holger

    Solutions:
    -The 'proper' way for application specific stuff is to use a properties file, not env vars.
    -Use System.getenv(), only works for versions before 1.3
    -Use the java command line option '-D'
    -Use Runtime.exec(), similar to the way you suggested.
    -Use JNI.

  • How to Set and Use a global variable within a session?

    Dear All,
    I'm new to jsp, and would like to ask how to set and use a global variable within a session?
    Thanks in advance.
    Regards,
    Cecil

    With session.setAttribute("name",object) you can store a Attribute in the session object.
    with session.getAttribute("name") you can get it.
    That's it.
    Regards,
    Geri

Maybe you are looking for

  • Itune installation failure

    I am having an installation failure issue with my itunes 11 software.  File is corrupted and i don't know what to do.  I've un-install and re-installed the software three times and continue to get the same error message.  It states that "This copy of

  • Now you see it, you don't -

    Another surprise from my inherited doc set, though in general my predecessor didn't do a bad job: a paragraph style specifies a background colour (CMYK, process) to give white text on a blue background on the cover page. No problems on screen, otherw

  • How to access contact list while a call is going o...

    Can anybody how to access contact list while a call is going on or call is on hold in Nokia E5 moblile?

  • Printing duplex then simplex not working?

    I downloaded a .pdf file and printed it duplex.  OK.  That worked fine.  Then I went into PROPERTIES and selcted Simplex.  It still prints in duplex?  It doesn't matter if I create a 'preset' and save the .pdf thereafter.  There doesn't seem to be  w

  • Getting ram installed in store

    i have to questions. can you upgrade from the 512 to the 1 gig in the store? or can you only do that online? i would like to get my computer from the store and i was wondering if they do that for you. i heard that they do from one post and they dont