Run the second sql statement only if the first sql statement is set to zero.

Hey guys I seem to have a mental block here. I have two sql statements. I would like to than the second to run only if the first sql statement is set to zero. I know that I can use PLsql but I would really like to see if I can do this with sql upward. Your answers are very much appreciated.
This is the first sql
  Select     ft.fund_code, 
             ft.orgn_code, 
             ft.acct_code, 
             ft.amount, 
             fb.owner_pidm, 
             ft.prog_code      
      from ftrbremb fb , ftcractg ft
      where fb.doc_code = 'TR000038'
      and fb.ftpbport_id = ft.ftpbport_id
second sql statement
     Select ft.fund_code, 
             ft.orgn_code, 
             ft.acct_code, 
             ft.amount, 
             fb.owner_pidm, 
             ft.prog_code      
      from ftrbremb fb , ftcractg ft, ftprexps fx
      where fb.doc_code = 'TR000038'
      --and fb.ftpbport_id = ft.ftpbport_id
      and fx.ftrbremb_id = fb.id
      and ft.ftprexps_id = fx.id;
How can I combine these two statements together so that when the first is null the second run. As a bonus, I want to get just the first line as well.
Any help would be greatly appreciated. I tried to accomplish with the case statement but it dosent everything seems to work for me.
Thank you

Miguel,

the idea is simple: join the two queries (via the union of all) and to change the second part as to return only the rows if the first query returns no rows by changing the NOT EXISTS (first request). Hope I made it clear... ;)

Tags: Database

Similar Questions

  • monitor client for iMac running the first pro 6

    Any suggestions on what to use to connect a client monitor to an iMac running the first pro 6

    I think that I just asked a similar question: Monitoring solutions

    That's what I was looking at the iMac: Blackmagic Design: intensity

    You can see he plays nice with an iMac and first. I'm still in the early phase of research myself.

  • I just upgraded to 10 Windows and now I can't get into Photoshop Elements.  I get the error 150:30.  Set to zero, as suggests, does not, of course.

    I just upgraded to 10 Windows and now I can't get into Photoshop Elements.  I get the error 150:30.  Set to zero, as suggests, does not, of course.

    Thanks - I thought that this could be the best answer!  I just hope that, in general, PSE 8 works with W-10!

  • my computer will run the first

    I have a pc hp of hearts with APU A6 - 3420 m and a graphics Radeon (TM) 1.50 GHz I have plenty of space for the download.

    I just want you to.

    Thank you

    It's 64-bit with 5400 RPM and 6,00 GB built in ram.

    Probably not huh?

    Thanks for the reply

  • That in order to run the reconciliation of ldap and the synchronization to run?

    Hello

    I'm running on IOM 11 GR 2 PS1.  I am migrating users, admin roles and application of IOM 10 g to 11 GR 2 IOM roles.

    I am trying to simulate zero-day and I have completed the following tasks:

    1. run the "LDAP role hierarchy full reconciliation."

    Validation: all OID groups appear in the table of the upg.

    2 turn off the LDAP synchronization (I chose to activate LDAP synchronization during the installation of the IOM)

    Validation: create a new user and no account of the OID is created in OID.

    3. run the first scheduled custom task to create users and admin roles using the data of the implementation of the 10 g IOM.

    Validation: the users are created in the table of the usr.  Got about 5000 documents in.

    4 re - enable LDAP synchronization

    Validation: create a new user and a matching OID account is created in the OID.

    3A ran all reconciliations LDAPSync 4 (LDAPSync, hierarchy, select post available role of Post allow provision to LDAP users, Post select roles available to LDAP, Post Select available roles for LDAP, LDAP group memberships).

    Validation: select usr_ldap_dn in usr;  This property returns the value of the user dn in OID.

    5 ran all reconciliations remaining LDAP (with the exception of the deletion).  The number of records in the table of the usr goes to 7000 records.  Updated full reconciliation and create LDAP users created a few new records by IOM.  It seems like if it was a reconciliation of the source of confidence with the OID being the source of confidence.  It's not good for my use case.  I don't want users of OID to create in the IOM.

    I have 1 not more to finish which is to run a second custom scheduled task to add application roles for users with distributed LDAP synchronization.

    I'm doing this right?  How can I reconcile an OID without creating users in IOM with users of

    OID?

    I'm so lost...

    Thank you

    Khanh

    In what order should

    Hi Khanh,

    [Is not good for my use case.  [I don't want users of OID to create in the IOM]

    Do not forget this Ldap synchronization that we use when we want that all users of OID - EEM to be synchronized. Otherwise, you should have disabled the Ldap synchronization and used OID 11 g connector.

    So if you want to link users to IOM help process form/resouce OID, then its essential to use OID 11 g connector.

    ~ J

  • Run the query qutomatically?

    I have some static queries, where nothing changes, they just need to be re - run the first thing Monday morning.

    I would like to know the best way to automate this? I'm on Oracle 11 G Enterprise and just an end user without administrator privileges.

    I have SQL * Plus, Toad and SQL Developer available and I'm trying to figure out the best wa this simply. I thought that it
    a way to store the SQL code on the side server, as with the function or Procs and just load the database when run the SQL.

    So maybe instead of one email, maybe a follow-up table can be updated with the status of the update. So, if I have 3-6 different
    SQL, the tracking table would have column 2, name of the Table and column DDL Date or anything that makes sense.

    So my tracking table would be updated when you complete the SQL and tell me when it has finished running to be looking in the DDL Date column.
    and then I could see what table he speaks, not sure... or what's the best way it is to do.

    At this point, I'm in search mode, so some of my question may sound silly, but that's how I learned, thank you.

    Hello

    You can use dbms_scheduler to run a procedure at regular intervals (for example, every Monday at 6:00).
    http://download.Oracle.com/docs/CD/E11882_01/AppDev.112/e16760/d_sched.htm#CIHHBGGI

    The easiest way to view the results is probably to have the procedure INSERT messages into a log table. I think that's what you mean by a "tracking table.

  • Why the VI does not work the first time?

    Hello fellow users of LabVIEW

    I did a VI that pulls data from a worksheet and then manipulates the data in different rows and columns to give a final spreadsheet of desired values.

    This VI works fine for me, except when I run the first time only, in which case it gives me values of nonsense.

    Could you please tell me what I'm doing wrong with the block diagram. It could be a problem with the data stream.

    Thank you

    mhaque

    My guess was very good.

    Yes, you have a race condition.  You read some values through a local variable in the upper part of your VI.  But you write in fact of all values of these indicators until the first image in your sequence structure.  Either thing could happen first, but it is very likely that your local variables are read first.  Thus the default data meaningless.  You should put these calculations in the first image of the sequence structure.  And use wire to one of the constants in the calculations rather than a local variable.

    In fact, I don't know if you need to use local variables anywhere in your VI.  And I also believe you can eliminate both your internal and external sequence structures.  You should always use wires to define your data flow.  The structure of your internal sequence pretty well done this already.  And if you get rid of your local variables and connect to the source of these values, no sequence structure, no variables, and no race condition.

    Try this VI.  I cleaned up.

  • the analysis on the first incorrect execution

    I have the VI attached to analyze the arguments of the command line of a program I wrote.

    The arguments are pre filled as they would in the real envyronment running, well I can't always count on the PN parameter in the 1nth of the table element.  I am looking for the value of the PN parameter.

    The first time I run the vi, it does not find the value, but each race after that which detects that the value.

    Any suggestions?

    Edited to add: if I change a value in the table to a different place in the table, and then run, the first time it will not find the FN, but each time, after it will be.

    Edited again: addition of parse string.vi to attachments

    Race condition!

    Why do you use a local variable of Index instead of the wire in the loop For?

    During the first run of your program, the flag is set to zero in it.  This table of index uses this value as the local variable is read before the loop For ends running to write a new value to this indicator.  Next time (assuming that you haven't changed any data) the value of the indicator is correct because it is there since the previous run of the VI.

  • First character left in file by reading the first line in text file

    When you use the function of reading text from a file file, I noticed that the 1st character is left in the file. I read the line correctly.

    When adding a 2nd line this character is in the file.

    Part vi code is attached.

    Any ideas?

    Thank you.

    Elik

    Can you attach a file of real data and tell us what you mean by "first character". The number of characters per line do you have?

    Can you tell us what you see in the modified file and what you expect to see.

    Everything seems good.

    1. Read you the first line and so the file pointer is just after the first line
    2. You set the size of the file at the end (seems unnecessary, because it does nothing). The file pointer is always right after the first line.
    3. You write the first line you read concatenated with a second line. It will be written on the current file pointer, i.e. after the existing line
    4. The first line is in the file twice, as planned.

    Setting the file size to the 'end' on an existing file does not have something useful. If you want to set the position of the file instead?

    Try to set the file position from and new data will be written at the beginning of the file.

  • How to convert the next update of FORALL to run the SQL UPDATE statement

    I have a FORALL loop for updating a table. It takes too much time. I want to rewrite the code to a direct sql UPDATE. Also of other tips or tricks that can help to run the fastest proc?
    CURSOR cur_bst_tm IS
    SELECT listagg(tm, ' ') WITHIN GROUP(ORDER BY con_addr_id) best_time,
           con_addr_id
       FROM   (select Trim(Upper(con_addr_id)) con_addr_id,
                      '&'
                      ||decode(Initcap(start_day), 
                                      'Monday', 'm',
                                    'Tuesday', 'tu',
                                    'Wednesday', 'w',
                                    'Thursday', 'th',
                                    'Friday', 'f',
                                     Initcap(start_day))
                      ||'='
                      ||trunc(( ( TO_DATE(start_tm,'HH12:MI:SS PM') - trunc(TO_DATE(start_tm,'HH12:MI:SS PM')) ) * 24 * 60 ))
                      ||','
                      ||trunc(( ( TO_DATE(end_tm,'HH12:MI:SS PM') - trunc(TO_DATE(end_tm,'HH12:MI:SS PM')) ) * 24 * 60 )) tm
               FROM   (SELECT DISTINCT * FROM ODS_IDL_EDGE_OFFC_BST_TM)
                 WHERE con_addr_id is not null)
      GROUP  BY con_addr_id
      ORDER BY con_addr_id;
    
    TYPE ARRAY IS TABLE OF cur_bst_tm%ROWTYPE;
    l_data ARRAY;
    
    
    BEGIN
    
     OPEN cur_bst_tm;
        
         LOOP
        FETCH cur_bst_tm BULK COLLECT INTO l_data LIMIT 1000;
    
        FORALL i IN 1..l_data.COUNT
      
          UPDATE ODS_CONTACTS_ADDR tgt
          SET best_times = l_data(i).best_time,
          ODW_UPD_BY = 'IDL - MASS MARKET',
           ODW_UPD_DT = SYSDATE,
          ODW_UPD_BATCH_ID = '0'
          WHERE Upper(edge_id) = l_data(i).con_addr_id
           AND EXISTS (SELECT 1 FROM ods_idl_edge_cont_xref src
                       WHERE tgt.contacts_odw_id = src.contacts_odw_id
                          AND src.pc_flg='Y')   
           ;       
    
        EXIT WHEN cur_bst_tm%NOTFOUND;
        END LOOP;
         
      CLOSE cur_bst_tm;
    Record count: -.

    Select count (*) from
    ODS_IDL_EDGE_OFFC_BST_TM;
    140 000

    SELECT count (*)
    Ods_idl_edge_cont_xref SRC
    WHERE src.pc_flg = 'Y';
    118 000

    SELECT count (*)
    OF ODS_CONTACTS_ADDR;
    671 925

    Version of database 11g.

    Execution plan for update:
    Operation object name lines cost/output PStart PStop object node bytes

    Mode of UPDATE STATEMENT Optimizer = ALL_ROWS 6 K 8120
    UPDATE ODW_OWN2. ODS_CONTACTS_ADDR
    SEMI 6 K 256 K 8120 HASH JOIN
    TABLE ACCESS FULL ODW_OWN2. ODS_CONTACTS_ADDR 6 K 203 K 7181
    TABLE ACCESS FULL ODW_OWN2. ODS_IDL_EDGE_CONT_XREF K 118 922 K 938

    Edited by: user10566312 May 14, 2012 01:07
  • Run code in if previous second if statement if the statement is executed?

    if (variable == 1){
                   //code
                   //Execute this code.
    } else if (variable == 2) {
                   //code
                   //Execute this code and the previous code in totalBullets == 1
    } else if (variable == 3) {
                   //code
                   //Execute this code and the previous code in totalBullets == 1 and 2
    }
    
    

    How do I do the above example?

    I do not want to copy the code of the first in the second and first and second in the third.

    My mind does not work and there is probably an easy way to extremelly to get this working.

    I know that I could used functions, but for some reason it stops the instance referencing work: _root ["ball" + j] does not work in a function.

    Is the reason for wanting this because you have a lot of code that you do not want to repeat?  If not, why?

  • Error ORA-00979 when you run the SQL in Oracle 11.2.0.3

    Hi Oracle Experts,


    I am trying to execute a SQL statement which consist of 2-3 levels of inline queries. Part of this SQL statement is as below:
    SELECT
          "SAMPLE_RESULT"."PROPERTYID",
          "SAMPLE_RESULT"."QUALIFIER",
          ROUND(AVG(SAMPLE_RESULT.RESULT),2) avg_result,
          AVG(DECODE(SAMPLE.QUALITYSTATUS, 'P', 1,'F', 5)) qltystatus,
          TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy') sampledt,
          TO_CHAR("SAMPLE"."SAMPLEDT",'rrrr-mm-dd') sortdate
          STD.stdev,
          getCL.cl
        FROM
          (
            SELECT
              ROUND(stddev(INS.avg_result),2) stdev
            FROM
              (
                SELECT
                  "SAMPLE_RESULT"."PROPERTYID",
                  "SAMPLE_RESULT"."QUALIFIER",
                  ROUND(AVG(SAMPLE_RESULT.RESULT),2) avg_result,
                  AVG(DECODE(SAMPLE.QUALITYSTATUS, 'P', 1,'F', 5)) qltystatus,
                  TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy') sampledt
                FROM
                  "SAMPLE",
                  "SAMPLE_RESULT",
                  "ACTIVITY"
                WHERE
                  (
                    "SAMPLE"."SAMPLEID" = "SAMPLE_RESULT"."SAMPLEID"
                  )
                AND
                  (
                    "SAMPLE_RESULT"."TESTINSTANCE" = fn_max_instance (
                    sample.sampleid, sample_result.testid, sample_result.propertyid
                    )
                  )
                AND
                  (
                    "SAMPLE"."ACTIVITYID" = "ACTIVITY"."ACTIVITYID"
                  )
                AND
                  (
                    ACTIVITY.VARIANTID IN ('Sales Gas','Contaminants End')
                  )
                AND
                  (
                    ACTIVITY.LOCATIONID = 'S-5003C'
                  )
                AND
                  (
                    SAMPLE.EVENTID <> 'AD-HOC'
                  )
                AND
                  (
                    "SAMPLE"."SAMPLESTATUS" = 'L'
                  )
                AND
                  (
                    TO_DATE(TO_CHAR(SAMPLE.SAMPLEDT,'dd-mon-yyyy')) BETWEEN TO_DATE
                    (TO_CHAR(:StartDate,'dd-Mon-RRRR')) AND TO_DATE(TO_CHAR(
                    :StartDate,'dd-Mon-RRRR')) + 6
                  )
                AND
                  (
                    SAMPLE_RESULT.PROPERTYID = 'GCV'
                  )
                GROUP BY
                  SAMPLE_RESULT.PROPERTYID,
                  SAMPLE_RESULT.QUALIFIER,
                  TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy')
              )
              INS
          )
          STD,
          (
            SELECT
              ROUND(AVG(INS.avg_result),2) cl
            FROM
              (
               SELECT
                  "SAMPLE_RESULT"."PROPERTYID",
                  "SAMPLE_RESULT"."QUALIFIER",
                  ROUND(AVG(SAMPLE_RESULT.RESULT),2) avg_result,
                  AVG(DECODE(SAMPLE.QUALITYSTATUS, 'P', 1,'F', 5)) qltystatus,
                  TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy') sampledt
                FROM
                 "SAMPLE",
                  "SAMPLE_RESULT",
                  "ACTIVITY"
                WHERE
                  (
                    "SAMPLE"."SAMPLEID" = "SAMPLE_RESULT"."SAMPLEID"
                  )
                AND
                  (
                    "SAMPLE_RESULT"."TESTINSTANCE" = fn_max_instance (
                    sample.sampleid, sample_result.testid, sample_result.propertyid
                    )
                  )
                AND
                  (
                    "SAMPLE"."ACTIVITYID" = "ACTIVITY"."ACTIVITYID"
                  )
                AND
                  (
                    ACTIVITY.VARIANTID IN ('Sales Gas','Contaminants End')
                  )
                AND
                  (
                    ACTIVITY.LOCATIONID = 'S-5003C'
                  )
                AND
                  (
                    SAMPLE.EVENTID <> 'AD-HOC'
                  )
                AND
                  (
                    "SAMPLE"."SAMPLESTATUS" = 'L'
                  )
                AND
                  (
                    TO_DATE(TO_CHAR(SAMPLE.SAMPLEDT,'dd-mon-yyyy')) BETWEEN TO_DATE
                    (TO_CHAR(:StartDate,'dd-Mon-RRRR')) AND TO_DATE(TO_CHAR(
                    :StartDate,'dd-Mon-RRRR')) + 6
                  )
                AND
                  (
                    SAMPLE_RESULT.PROPERTYID = 'GCV'
                  )
                GROUP BY
                  SAMPLE_RESULT.PROPERTYID,
                  SAMPLE_RESULT.QUALIFIER,
                  TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy')
              )
              INS
    
          )
          getCL,
          "SAMPLE",
          "SAMPLE_RESULT",
          "ACTIVITY"
        WHERE
          (
            "SAMPLE"."SAMPLEID" = "SAMPLE_RESULT"."SAMPLEID"
          )
        AND
          (
            "SAMPLE_RESULT"."TESTINSTANCE" = fn_max_instance (sample.sampleid,
            sample_result.testid, sample_result.propertyid)
          )
        AND
          (
            "SAMPLE"."ACTIVITYID" = "ACTIVITY"."ACTIVITYID"
          )
        AND
          (
            ACTIVITY.VARIANTID IN ('Sales Gas','Contaminants End')
          )
        AND
          (
            ACTIVITY.LOCATIONID = 'S-5003C'
          )
        AND
          (
            SAMPLE_RESULT.PROPERTYID IN ('GCV','SG','T. Sulphur','Dew Point',
            'HC Dew Pts')
          )    
        AND
          (
           TO_DATE(TO_CHAR(SAMPLE.SAMPLEDT,'dd-mon-yyyy')) BETWEEN TO_DATE(TO_CHAR
            (:StartDate,'dd-Mon-RRRR')) AND TO_DATE(TO_CHAR(:StartDate,
            'dd-Mon-RRRR')) + 6
          )
        GROUP BY "SAMPLE_RESULT"."PROPERTYID", "SAMPLE_RESULT"."QUALIFIER", TO_CHAR("SAMPLE"."SAMPLEDT",'dd-Mon-yyyy'), TO_CHAR("SAMPLE"."SAMPLEDT",'rrrr-mm-dd'),
        
          STD.stdev,
          getCL.cl
      )
    When I run the level the lowest and second lowest level inline queries statements, which consists of a select field of data and functions, there is no error and capable of generating the result.

    But when I run the statement which refer to the alias of queries inline (STD, getCL), it prompted an error ORA-00979 not a group by expression. This happened only Oracle 11.2.0.3. If I run the statement in another version of Oracle (11 GR 1 material and below), I am able to generate the result.

    Please advice how can I fix this problem.

    Published by: xysOra on 29 April 2013 19:37

    It seems that this should be the "SAMPLE" TO_CHAR conversions "" SAMPLEDT ".

    You seem to be willing to cut the time part of SAMPLEDT. The best way to do so is TRUNC (SAMPLEDT).

    In each of the groups of clauses, replace TO_CHAR ('SAMPLE'. ("' SAMPLEDT ', 'dd-Mon-yyyy') with TRUNC ('SAMPLE'. (' "SAMPLEDT") and completely remove the TO_CHAR ('SAMPLE'. ("' SAMPLEDT ',"dd-mm-rrrr") in the last group of.

    Replace in selection lists, TO_CHAR ('SAMPLE'. ("' SAMPLEDT ', 'dd-Mon-yyyy') with TO_CHAR (TRUNC ('SAMPLE'. ((' ' SAMPLEDT '), 'dd-Mon-yyyy') and replace TO_CHAR ("SAMPLE". "SAMPLEDT", "dd-mm-rrrr") with TO_CHAR (TRUNC ("SAMPLE" ".")) " "" "SAMPLEDT"), "dd-mm-rrrr").

    These changes can take you the ORA-00979 not one group by expression.

    Also the date manipulation is wrong — you do implicit conversions to date using default formats, when what you seem to want is to truncate the time part. Instead of

     TO_DATE(TO_CHAR(SAMPLE.SAMPLEDT,'dd-mon-yyyy')) BETWEEN TO_DATE(TO_CHAR
            (:StartDate,'dd-Mon-RRRR')) AND TO_DATE(TO_CHAR(:StartDate,
            'dd-Mon-RRRR')) + 6
    

    use

     TRUNC(SAMPLE.SAMPLEDT) BETWEEN TRUNC(:StartDate) AND TRUNC(:StartDate) + 6
    

    I hope this helps.
    David

  • Initialization of the LEDs before running the second test.

    I am novice programmer Labview using LV 8.6.  I have an application where I have a lot of lights to indicate success or failure throughout my application in many different cases. After running these tests test that passed are indicated on the front panel with a light green. These failed tests are lit with a red LED. Is there an easy way to initialize all the LEDs return to their shutdown state before running the test a second time without reload the application?

    Here is a small example. First the Boolean values are changed to true, then they return to their fake. Does that help?

  • If I run the calc script to aggregate a BSO cube, it blocks and release each block in a few seconds?

    Hello

    If I run the calc script to aggregate a BSO cube, it blocks and release each block in a few seconds? Or is it keep held locked blocks even after aggregation for this block is over?

    For example if I correct sparse dimensions Forecast, FY15, dec.  and my accounts dimension is only dense, after calc has my senior level members in the accounts, it it will issue after updating (i.e. in fractions of seconds) or is agg keep it held in a lock?

    I ask because I want to run scripts tot., but there is the update of our cube users.  I never had a problem to start agg, while users are updating.  But maybe I am lucky.  If a user updates a closed block, they will receive an error message that I think.  They may try to update again after a few seconds, I hope.

    Thank you.

    Locking behavior for BSO Essbase is described in the database administrator's Guide: http://docs.oracle.com/cd/E57185_01/epm.1112/essbase_db/dstinteg.html

    It is certainly theoretically possible that a user can obtain a lock because of a calc, although I can't say I saw him be a problem in real-world applications (perhaps because access uncommitted is the default).

  • Helps the function 'Running background PL/SQL'

    Hello everyone.

    I come here for assistance with the service running background PL/SQL within the APEX. Here's a background of what I have to do.

    Background:

    Currently, I have just a page with a button above and some display boxes. The button calls a process flow Oracle Warehouse Builder (OWB) named RUN_ADJ_VAR and does what he must do. That works fine if my button simply calls the PL/SQL code of

    BEGIN

    ETQUEW. RUN_ADJ_VAR;

    END;

    Now that I know that the process flow and the button are working fine, I need to make the page "intelligently" by limiting multiple submissions until the process ends.

    What I need:

    I need assistance with running background PL/SQL function. My work has been running for a while and I need to run in the background and provide a status of the user, while restricting another presentation by the user. From what I've read here:

    Advanced programming techniques

    According to me, that this DBMS wrapper function, it's what I use.

    What I have so far:

    Using the API and example, I made my own attempt at this and it does not work. Here's what I have so far:

    [code]

    DECLARE

    v_sql VARCHAR2 (32767).

    BEGIN

    v_sql: = '

    BEGIN

    ETQUEW. RUN_ADJ_VAR;

    APEX_PLSQL_JOB. () UPDATE_JOB_STATUS

    P_JOB = >: APP_JOB,.

    P_STATUS = > "done");

    END IF;

    END;

    ';

    : P1_JOB: = APEX_PLSQL_JOB. () SUBMIT_PROCESS

    p_sql = > v_sql,

    p_when = > sysdate,.

    p_status = > 'Submit');

    : P1_POST_DONE: = 'Y ';

    END;

    [/ code]

    What the code so far:

    The code seems to ignore the first part and does work through the underlined only section. The work never appears to run and the button can be clicked several times.

    Other Options:

    I don't know if the function from PL/SQL background running is the only way to do that. The work is performed for about 15 minutes so I can't use a javascript script wait indicator since that will expire because of the hours of work. I searched all over the internet and forums and I feel I have exhausted all my options. I am very new to the APEX and PL/SQL in general, so your help is very appreciated.

    Thank you!!!

    Hello Konrad B.!

    Try to rewrite the code as shown below:

    DECLARE

    v_sql VARCHAR2 (32767).

    BEGIN

    v_sql: = '

    BEGIN

    ETQUEW. RUN_ADJ_VAR;

    END;

    ';

    : P1_JOB: = apex_plsql_job.submit_process (v_sql);

    END;

    Assume that P1_JOB - question on the page. After submitting the job, this point will be containing number of jobs. The job number,
    username (can get APP_USER) and workspace id (can get WORKSPACE_ID) you can check the status
    view of working level (field SYSTEM_STATUS) APEX_PLSQL_JOBS:

    SELECT SYSTEM_STATUS
    FROM APEX_PLSQL_JOBS
    WHERE JOB = :P1_JOB
    AND ANDUSER = :APP_USER
    AND SECURITY_GROUP_ID = :WORKSPACE_ID
    

    So you can make conditional button, selected example condition "NOT Exists (SQL query returns no rows)" and in the expression type:

    Select 1 from apex_plsql_jobs

    where employment =: P1_JOB

    and end user =: APP_USER

    and security_group_id =: WORKSPACE_ID

    and system_status in ("in PROGRESS", "SUBMITTED")

    If you must run the job for the user, then button will not be returned.

Maybe you are looking for

  • backup of the complete phone before repair

    My iPhone SE earphone is damaged as a result of certain dust went inside. I wish him well more (not even 2 months)I'll give this to fix it, but I have to take a complete to the top of my phone before I give him. I made the back upward using settings-

  • connected through the mapped drive, NOT ReadyCloud

    Very strange, I am able to do my mapped drives fine, so I know connectivity is ok. I'm not able to see my SIN in the ReadCloud.Netgear.com or in the desktop application. I disabled my firewall. I can't think of anything to try. Any suggestions please

  • Windows BSOD v3 - 772 g 8.1 problems

    After I upgraded my v3 - 772g to Windows 8.1 (via windows store) I keep geeting blue screen. This is the entrance to system log I get: The computer was restarted after a bugcheck.  The bugcheck was: 0 x 00000109 (0xb3b72bdeedd96582, 0xfffff803a48fa00

  • Audio play without be clicked on

    MSN is my homepage. Windows 7 and ie 9 is my browser. I get intermittiing pass audio when the computer is - that's a moment approached. I did 2 full analysis and had files to delete every time, however, the same thing continues. Also, I get error mes

  • Barracuda ARE hard drives operate at 1.5 gb/s instead of 3 Gbps

    Driver software is not found I bought for four 500 GB barracuda ARE hard disks and after the installation of two of them in my system started having problems. Instead of 3 Gbit/s that they supplied only 1.5 Gbps says windows" Description Signature of