JOIN ON 2 different sets of table depending on the result of first set

<br>
I have a query where it returns results. I want to join this query to
2 different sets of table depending upon the first set has a result or not.
if first set didnt had a results or records then check for the second set.
SELECT 
peo.email_address,
r.segment1 requistion_num,
to_char(l.line_num) line_num,
v.vendor_name supplier, 
p.CONCATENATED_SEGMENTS category,
to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
TO_CHAR(l.need_by_date,'MM/DD/YYYY') need_by_date,
pe.full_name requestor,
l.item_description,
pr.segment1 project_num,
t.task_number,
c.segment1,
c.segment2
FROM po_requisition_headers_all r,
     po_requisition_lines_all l,  
(SELECT project_id,task_id,code_combination_id, distribution_id,requisition_line_id,creation_date  FROM
(SELECT project_id,task_id,code_combination_id,distribution_id,creation_date,requisition_line_id,ROW_NUMBER ()
OVER (PARTITION BY requisition_line_id ORDER BY requisition_line_id,distribution_id ) rn
FROM po_req_distributions_all pod) WHERE rn = 1) d,
gl_code_combinations c,
POR_CATEGORY_LOV_V p,
per_people_v7 pe,
PA_PROJECTS_ALL pr,
PA_TASKS_ALL_V t,
ap_vendors_v v,
WHERE  d.creation_date >= nvl(to_date(:DATE_LAST_CHECKED,
'DD-MON-YYYY HH24:MI:SS'),SYSDATE-1)
AND
l.requisition_header_id = r.requisition_header_id
AND l.requisition_line_id = d.requisition_line_id
AND d.code_combination_id = c.code_combination_id
AND r.APPS_SOURCE_CODE = 'POR'
AND l.category_id = p.category_id
AND r.authorization_status IN ('IN PROCESS','PRE-APPROVED','APPROVED')
AND l.to_person_id = pe.person_id
AND pr.project_id(+) = d.project_id
AND t.project_id(+) = d.project_id
AND t.task_id(+) = d.task_id
AND v.vendor_id(+) = l.vendor_id
and r.requisition_header_id in(
SELECT requisition_header_id FROM po_requisition_lines_all pl                    
GROUP BY requisition_header_id HAVING SUM(nvl(pl.quantity,0) * nvl(pl.unit_price, 0)) >=100000)
group by
peo.email_address,
r.REQUISITION_HEADER_ID,
r.segment1 ,
to_char(l.line_num) ,
v.vendor_name, 
p.CONCATENATED_SEGMENTS ,
to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
TO_CHAR(l.need_by_date,'MM/DD/YYYY') ,
pe.full_name ,
l.item_description,
c.segment1,
c.segment2,
pr.segment1 ,
t.task_number
<b>I want to join this query with this first set </b>
SELECT b.NAME, c.segment1 CO, c.segment2 CC,
          a.org_information2 Commodity_mgr,
          b.organization_id, p.email_address
     FROM hr_organization_information a, hr_all_organization_units b, pay_cost_allocation_keyflex c, per_people_v7 p
    WHERE a.org_information_context = 'Financial Approver Information'
      AND a.organization_id = b.organization_id
       AND b.COST_ALLOCATION_KEYFLEX_ID = c.COST_ALLOCATION_KEYFLEX_ID
       and a.ORG_INFORMATION2 = p.person_id
      AND NVL (b.date_to, SYSDATE + 1) >= SYSDATE
      AND b.date_from <= SYSDATE;
<b>if this doesnt return any result then i need to join the query with the 2nd set</b>
select lookup_code, meaning, v.attribute1 company, v.attribute2 cc,
            decode(v.attribute3,null,null,p1.employee_number || '-' || p1.full_name) sbu_controller,
            decode(v.attribute4,null,null,p2.employee_number || '-' || p2.full_name) commodity_mgr
            from fnd_lookup_values_vl v,
            per_people_v7 p1, per_people_v7 p2
            where lookup_type = 'BIO_FIN_APPROVER_INFO'
              and v.attribute3 = p1.person_id(+)
            and v.attribute4 = p2.person_id(+)
            order by lookup_code
How do i do it?
[pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

<br>
I have hard coded the 2 jon sets into one using UNION ALL but if one record exists in both sets how would i diferentiate between the 2 sets.
COUNT(*) will only give the total records.
if there r total 14
suppose first set gives 12 records
second set gives 4 records.
But i want only 14 records which could 12 from set 1 and 2 from set 2 since set1  and set2 can have common records.
SELECT 
peo.email_address,
r.segment1 requistion_num,
to_char(l.line_num) line_num,
v.vendor_name supplier, 
p.CONCATENATED_SEGMENTS category,
to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
TO_CHAR(l.need_by_date,'MM/DD/YYYY') need_by_date,
pe.full_name requestor,
l.item_description,
pr.segment1 project_num,
t.task_number,
c.segment1,
c.segment2
FROM po_requisition_headers_all r,
     po_requisition_lines_all l,  
(SELECT project_id,task_id,code_combination_id, distribution_id,requisition_line_id,creation_date  FROM
(SELECT project_id,task_id,code_combination_id,distribution_id,creation_date,requisition_line_id,ROW_NUMBER ()
OVER (PARTITION BY requisition_line_id ORDER BY requisition_line_id,distribution_id ) rn
FROM po_req_distributions_all pod) WHERE rn = 1) d,
gl_code_combinations c,
POR_CATEGORY_LOV_V p,
per_people_v7 pe,
PA_PROJECTS_ALL pr,
PA_TASKS_ALL_V t,
ap_vendors_v v,
WHERE  d.creation_date >= nvl(to_date(:DATE_LAST_CHECKED,
'DD-MON-YYYY HH24:MI:SS'),SYSDATE-1)
AND
l.requisition_header_id = r.requisition_header_id
AND l.requisition_line_id = d.requisition_line_id
AND d.code_combination_id = c.code_combination_id
AND r.APPS_SOURCE_CODE = 'POR'
AND l.category_id = p.category_id
AND r.authorization_status IN ('IN PROCESS','PRE-APPROVED','APPROVED')
AND l.to_person_id = pe.person_id
AND pr.project_id(+) = d.project_id
AND t.project_id(+) = d.project_id
AND t.task_id(+) = d.task_id
AND v.vendor_id(+) = l.vendor_id
and r.requisition_header_id in(
SELECT requisition_header_id FROM po_requisition_lines_all pl                    
GROUP BY requisition_header_id HAVING SUM(nvl(pl.quantity,0) * nvl(pl.unit_price, 0)) >=100000)
group by
peo.email_address,
r.REQUISITION_HEADER_ID,
r.segment1 ,
to_char(l.line_num) ,
v.vendor_name, 
p.CONCATENATED_SEGMENTS ,
to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
TO_CHAR(l.need_by_date,'MM/DD/YYYY') ,
pe.full_name ,
l.item_description,
c.segment1,
c.segment2,
pr.segment1 ,
t.task_number
UNION ALL
SELECT 
r.segment1 requistion_num,
to_char(l.line_num) line_num,
v.vendor_name supplier, 
p.CONCATENATED_SEGMENTS category,
to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
TO_CHAR(l.need_by_date,'MM/DD/YYYY') need_by_date,
pe.full_name requestor,
l.item_description,
pr.segment1 project_num,
t.task_number,
c.segment1,
c.segment2
FROM po_requisition_headers_all r,
     po_requisition_lines_all l,  
(SELECT project_id,task_id,code_combination_id, distribution_id,requisition_line_id,creation_date  FROM
(SELECT project_id,task_id,code_combination_id,distribution_id,creation_date,requisition_line_id,ROW_NUMBER ()
OVER (PARTITION BY requisition_line_id ORDER BY requisition_line_id,distribution_id ) rn
FROM po_req_distributions_all pod) WHERE rn = 1) d,
gl_code_combinations c,
POR_CATEGORY_LOV_V p,
per_people_v7 pe,
PA_PROJECTS_ALL pr,
PA_TASKS_ALL_V t,
ap_vendors_v v,
fnd_lookup_values_vl flv,
per_people_v7 p1,
per_people_v7 p2
WHERE  d.creation_date >= nvl(to_date('11-APR-2008',
'DD-MON-YYYY HH24:MI:SS'),SYSDATE-1)
AND
l.requisition_header_id = r.requisition_header_id
AND l.requisition_line_id = d.requisition_line_id
AND d.code_combination_id = c.code_combination_id
AND r.APPS_SOURCE_CODE = 'POR'
AND l.org_id = 141
AND l.category_id = p.category_id
AND r.authorization_status IN ('IN PROCESS','PRE-APPROVED','APPROVED')
AND l.to_person_id = pe.person_id
AND pr.project_id(+) = d.project_id
AND t.project_id(+) = d.project_id
AND t.task_id(+) = d.task_id
AND v.vendor_id(+) = l.vendor_id
AND flv.attribute1=c.segment1
AND flv.attribute2=c.segment2
AND flv.lookup_type = 'BIO_FIN_APPROVER_INFO'
and flv.attribute3 = p1.person_id(+)
and flv.attribute4 = p2.person_id(+)
and r.requisition_header_id in(
SELECT requisition_header_id FROM po_requisition_lines_all pl                    
GROUP BY requisition_header_id HAVING SUM(nvl(pl.quantity,0) * nvl(pl.unit_price, 0)) >=100000)
group by
r.REQUISITION_HEADER_ID,
r.segment1 ,
to_char(l.line_num) ,
v.vendor_name, 
p.CONCATENATED_SEGMENTS ,
to_char(round((nvl(l.quantity, 0) * nvl(l.unit_price, 0))),'99,999,999,999.99'),
TO_CHAR(l.need_by_date,'MM/DD/YYYY') ,
pe.full_name ,
l.item_description,
c.segment1,
c.segment2,
pr.segment1 ,
t.task_number

Similar Messages

  • In which table are stored the data of a set created by GS01?

    Hi All,
    could anyone tell me in which table are stored the data of a set created by GS01?
    Thanks

    Hi,
    It's stored in SETHEADER, SETNODE and SETLEAF tables.
    Regards,
    Eli

  • Apple Mail: How can I automatically set a signature, depending on the sender, NOT on the account?

    Apple Mail: How can I automatically set a signature, depending on the sender (have several for one account), NOT on the account?
    I have some comma-separated senders in my Apple Mail accounts, some for business, some for private (using the same account). When I'm sending a business mail, I would like to append my business signature, when I send a private one, either nothing, or a fun signature.
    Best,
    Berlin1892

    karenbee,
    Here's the solution for PCs: Tools>Options, then click Sync in the Options window. Good luck.

  • How to execute a procedure depending on the result of a query?

    Hello, I'm new in ODI.
    I want to execute a procedure depending on the result of a query Oracle table.
    We have a Oracle Table whit a column that contains two possibles values.
    I want read the table, row by row, and depending on this value, execute a Procedure or execute another.
    How can i do?

    what you need to do is
    1. create a variable which "new_var2" which has the count of the number of rows you want to process. must be data type numeric.
    2. copy "new_var2" to the package screen.
    3. duplicate the "new_var2" on the package screen and evaluate the variable and test for "> 0" zero, call it "new_var2_E"
    3. create a new odi variable "new_var1" with a refresh of "select field1 fom (select field1,rownum as rownumber from tablex) where rownumber = #new_var2" in the relevant schema and technology.
    4. copy "new_var1" into your package (some where in the flow)
    5. right click the "new_var1" variable in you package screen and you should get the option duplicate step (click on that)
    6. select the the duplicate "new_var1" on the package screen and correct the the name to something meaning full to you "new_var1_E", also change the "type" to "evaluate variable" then you should see a "value" box. enter one of the values you want to test in the box (remember do not put in quotes ' )
    7. now back on the package screen join the "new_var1" to the "new_var1_E" with an OK line
    8 you now join "new_var2" to "new_var2_E" with OK
    9 you join "new_var2_E" to "new_var1"
    10. you then join the "new_var1_E" with an OK or a KO line to the relevant procedure.
    12. you need to duplicate "new_var2" in the package screen one more time this time and call it "new_var2_D" set the type to evaluate and then select the increment of -1
    13. the relevant procedure to "new_var2_D" with an OK
    14. join the "new_var2_D" to the "new_var2_E" with an OK
    15. this should close off the loop now the exit point is "new_var2_E" with a KO line to the next part of your process....
    Basically you should end up with a loop on new_var2 decementing, and it is used to get a specific next record row from your table.
    Hope this helps, sorry it is a little long winded..
    Edited by: DavidGD on Feb 8, 2009 3:29 PM

  • QM Sceneri: MIC which has it Limits dependent on the results of a MIC.

    QM Scenerio
      The plan has multiple MIC's all with limits. First five MIC's are independent and rest three are having their limits dependent on the results of a MIC eg with a formula. say 0.8X lower limit and 1.1X upper limit of a MIC., where X is the result of the fifth MIC. Similarly the 7th and the 8th MIC's are having limits dependent on the same MIC with different formula.
    This kind of scenerio may be two times in an inspection Plan.
    Can the Gurus kindly give me the solution how to do it.

    No. Nothing that is standard.  You will have to probably look at creating your own custom valuation FM.  SAP allows you to create these FM's and then config them into the system. You would then selection the custom valuation in a sample procedure that you would create for each of these characteristics.   The valuation for the characteristic would then be carried out according to your custom FM.  No spec would be displayed in the inspection lot however.  But he valuation should be possible.
    FF

  • Hide Advance table Depending upon the value of dropDown

    Hi,
    I have 2 advance tables. 1st one has a DropDown. Depending upon the value of the dropdown in 1st advance table, the second advanced table should get rendered.
    I tried by getting the value of the dropdown by addingg a PPF and iterating trough the table and I got the value. But when I redirect to the same page, all the selection and other values in 1st advanced table vanish out.
    Can someone help me getting the 2nd table hidden and at the same time retaining the values for the 1st advanced table.
    Thanks in Advance,
    Kaushik Rambhiya

    Kaushik
    Implement PPR for this requirement and dont redirect the page
    Displaying image based selected value of choice bean
    http://oracleanil.blogspot.com/2009/05/ppr.html
    Thanks
    AJ

  • Search in Nested Tables and Insert the result into new Nested Table!

    How can I search in Nested Tables ex: (pr_travel_date_range,pr_bo_arr) using the SQL below and insert the result into a new Nested Table: ex:g_splited_range_arr.
    Here are the DDL and DML SQLs;
    Don't worry about the NUMBER( 8 )
    CREATE OR REPLACE TYPE DATE_RANGE IS OBJECT ( start_date NUMBER( 8 ), end_date NUMBER( 8 ) );
    CREATE OR REPLACE TYPE DATE_RANGE_ARR IS TABLE OF DATE_RANGE;
    DECLARE
       g_splited_range_arr   DATE_RANGE_ARR := DATE_RANGE_ARR( );
       g_travel_range        DATE_RANGE := DATE_RANGE( '20110101', '99991231' );
       g_bo_arr              DATE_RANGE_ARR := DATE_RANGE_ARR( DATE_RANGE( '20110312', '20110317' ), DATE_RANGE( '20110315', '20110329' ) );
       FUNCTION split_date_sql( pr_travel_date_range    DATE_RANGE,
                                pr_bo_arr               DATE_RANGE_ARR )
          RETURN DATE_RANGE_ARR
       IS
          l_splited_range_arr   DATE_RANGE_ARR;
       BEGIN
          SELECT start_date, end_date
            INTO l_splited_range_arr(start_date, end_date)
            FROM (WITH all_dates
                          AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM TABLE( pr_travel_date_range )
                              UNION ALL
                              SELECT tr_end_date, 0 FROM TABLE( pr_travel_date_range )
                              UNION ALL
                              SELECT bo_start_date - 1, 1 FROM TABLE( pr_bo_arr )
                              UNION ALL
                              SELECT bo_end_date + 1, -1 FROM TABLE( pr_bo_arr )),
                       got_analytics
                          AS (SELECT a_date AS start_date,
                                     LEAD( a_date ) OVER (ORDER BY a_date, black_out_val) AS end_date,
                                     SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val) AS black_out_cnt
                                FROM all_dates)
                    SELECT start_date, end_date
                      FROM got_analytics
                     WHERE black_out_cnt = 0 AND start_date < end_date
                  ORDER BY start_date);
          RETURN l_splited_range_arr;
       END;
    BEGIN
        g_splited_range_arr := split_date_sql(g_travel_range,g_bo_arr);
        FOR index_g_splited_range_arr IN g_splited_range_arr .FIRST .. g_splited_range_arr .LAST LOOP       
            DBMS_OUTPUT.PUT_LINE('g_splited_range_arr[' || index_g_splited_range_arr || ']: ' || g_splited_range_arr(index_g_splited_range_arr).start_date || '-'  || g_splited_range_arr(index_g_splited_range_arr).end_date );
        END LOOP;
    EXCEPTION
       WHEN NO_DATA_FOUND
       THEN
          NULL;
       WHEN OTHERS
       THEN
          NULL;
    END;Or can I create a VIEW with parameters of Nested Tables in it so I can simply call
    SELECT  *
      BULK COLLECT INTO g_splited_range_arr
      FROM view_split_date(g_travel_range,g_bo_arr);

    @riedelme
    For your questions:
    1) I don't want to store in the database as a nested table
    2) I don't want to retrieve data from the database. Data will come from function split_date() parameter and data will be processed in the function and function will return it in nested table format. For more detail please look at the raw function SQL.
    I have a SQL like:
    WITH all_dates
            AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM travel
                UNION ALL
                SELECT tr_end_date, 0 FROM travel
                UNION ALL
                SELECT bo_start_date - 1, 1 FROM black_out_dates
                UNION ALL
                SELECT bo_end_date + 1, -1 FROM black_out_dates),
         got_analytics
            AS (SELECT a_date AS start_date,
                       LEAD( a_date ) OVER (ORDER BY a_date, black_out_val)
                          AS end_date,
                       SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val)
                          AS black_out_cnt
                  FROM all_dates)
      SELECT start_date, end_date
        FROM got_analytics
       WHERE black_out_cnt = 0 AND start_date < end_date
    ORDER BY start_date;I want to change the tables black_out_dates and travel to Nested Array so I can use it in a function with Nested Array travel and Nested Array black_out_dates parameters and the function will return Nested Array of date ranges.
    Here is what I want in raw SQL:
        DECLARE
           g_splited_range_arr   DATE_RANGE_ARR := DATE_RANGE_ARR( );
           g_travel_range        DATE_RANGE := DATE_RANGE( '20110101', '99991231' );
           g_bo_arr              DATE_RANGE_ARR := DATE_RANGE_ARR( DATE_RANGE( '20110312', '20110317' ), DATE_RANGE( '20110315', '20110329' ) );
           FUNCTION split_date_sql( pr_travel_date_range    DATE_RANGE,
                                    pr_bo_arr               DATE_RANGE_ARR )
              RETURN DATE_RANGE_ARR
           IS
              l_splited_range_arr   DATE_RANGE_ARR;
           BEGIN
              SELECT start_date, end_date
                INTO l_splited_range_arr(start_date, end_date)
                FROM (WITH all_dates
                              AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM TABLE( pr_travel_date_range )
                                  UNION ALL
                                  SELECT tr_end_date, 0 FROM TABLE( pr_travel_date_range )
                                  UNION ALL
                                  SELECT bo_start_date - 1, 1 FROM TABLE( pr_bo_arr )
                                  UNION ALL
                                  SELECT bo_end_date + 1, -1 FROM TABLE( pr_bo_arr )),
                           got_analytics
                              AS (SELECT a_date AS start_date,
                                         LEAD( a_date ) OVER (ORDER BY a_date, black_out_val) AS end_date,
                                         SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val) AS black_out_cnt
                                    FROM all_dates)
                        SELECT start_date, end_date
                          FROM got_analytics
                         WHERE black_out_cnt = 0 AND start_date < end_date
                      ORDER BY start_date);
              RETURN l_splited_range_arr;
           END;
        BEGIN
            g_splited_range_arr := split_date_sql(g_travel_range,g_bo_arr);
            FOR index_g_splited_range_arr IN g_splited_range_arr .FIRST .. g_splited_range_arr .LAST LOOP       
                DBMS_OUTPUT.PUT_LINE('g_splited_range_arr[' || index_g_splited_range_arr || ']: ' || g_splited_range_arr(index_g_splited_range_arr).start_date || '-'  || g_splited_range_arr(index_g_splited_range_arr).end_date );
            END LOOP;
        EXCEPTION
           WHEN NO_DATA_FOUND
           THEN
              NULL;
           WHEN OTHERS
           THEN
              NULL;
        END;I must change the tables black_out_dates and travel in a way so it will be something like
    FROM TABLE( pr_travel_date_range )to get the result into l_splited_range_arr so it will be something like
              SELECT start_date, end_date
                INTO l_splited_range_arr(start_date, end_date)
                FROM (

  • How to get the colour of a line depending on the attribute of first charact

    Hi
    I am using DefaultStyledDocument in JTextPane.the function is depending on the frirst character of the line the whole line should be of one colour.for example if i tye the first character as '\' the whole line following this character must be green .Can anyone suggest me how to do it

    Hi,
    Simple example below:
    Suppose you have this method in AppmoduleImpl:
    public void testHello( ) {
    return "Hello";
    1.After you expose this to clientInterface,drop this method on the jspx page as ADF Parameter
    form
    2.Drop the return String as outputText
    3.Run the page,click on the commandButton & the outputText returns 'Hello'
    Regards,
    Shantala

  • Different fix lot size depending on the production version

    Hi all,
    I have the next scenario:
    2 production versions. 2 different fix lot size por each. So:
    Prod Version 1 - Fix lot size 200
    Prod Version 2 - Fix lot size 300
    I created the Quota Arrangement just to make SAP to take my favourite version. And trought the quota, I can define the lot size for each version. BUT.
    If I change the version in the order or in the planned order, the quantity don't change.
    So: How can I manage 2 different fix lot size for 2 different product versions? If I change the version once the order is created, how can I do the system change de quantity to the right one?
    Thanks in advante
    << Please do not offer points >>
    Edited by: Rob Burbank on Oct 1, 2010 2:53 PM

    I have n't  tried this scenario,
    This is my Idea
    Create a two production version
    for ex: lot size 100 to 1000, set the rounding profile qty as 1000
    for lot size 1001 to 99999, set the lot rounding profile value to 5000
    BY this way u can get the two lot based on the rounding profie
    Expert; please correct if i am wrong
    Edited by: Sundaresan . E. V on Oct 1, 2010 4:12 PM

  • Passing of internal table values to the select statement as SETS

    Hi All,
    Is there any way that i can restrict the values of a internal table to be passed to a select statement set by set..
    say for eg: if a itab has 1000 entries i want the first 500 to be going out in a select statement as a comparision for all entries and then the next set of 500 to go out..
    Please let me know.. this is very urgent..

    <b>Appending Several Lines</b>
    You can also append internal tables to index tables using the following statement:
    APPEND LINES OF <itab1> TO <itab2>.
    This statement appends the whole of ITAB1 to ITAB2. ITAB1 can be any type of table, but its line type must be convertible into the line type of ITAB2.
    When you append an index table to another index table, you can specify the lines to be appended as follows:
    APPEND LINES OF <itab1> [FROM <n1>] [TO <n 2>] TO <itab2>.
    <n 1 > and <n 2 > specify the indexes of the first and last lines of ITAB1 that you want to append to ITAB2.
    This method of appending lines of one table to another is about 3 to 4 times faster than appending them line by line in a loop. After the APPEND statement, the system field SY-TABIX contains the index of the last line appended. When you append several lines to a sorted table, you  must respect the unique key (if defined), and not violate the sort order. Otherwise, a runtime error will occur.
    Then u can use <b> FOR ALL ENTRIES</b> in select query.
    regards
    vinod

  • Print from Windows desktop via network, when the printer was first set up on a Mac

    My new printer works fine from my Mac mini. It is set up on my local network through a BT hub router, wirelessly, Bonjour enabled.When I try to set it up in addition to work from a Windows 8.1 desktop, the printer is recognised and the print-job goes to the print queue but then vanishes from the queue without any printing having started.I have tried using Wireless Direct for the Windows computer but it doesn't seem to help.I will now uninstall and re-install the Officejet on the 8.1 using the disc and see if that helps.I understand (is this right?) that enabling printer sharing doesn't help, as there are two different OS (Mac and MS).Any help would be very welcome.I had before another HP printer (Photosmart B110a) for the windows 8.1 (and on the Mac) and it never seemed properly installed on the Windows computer either. But it did print (but not scan etc.) 

    This problem is a result of a limitation in Windows 9x regarding the size of an image that you can send to the printer. The problem does not occur on Windows 2000/NT. This problem appeared with the increased color options of LabVIEW 6.0 on which the BB1.2 is based.Although it is not immediately obvious, your video driver and settings play a role in printing.
    1. Try adjusting the color palette your driver uses (i.e., 256 color, high olor, true color). The error may occur only in one of these modes. Also, change the resolution (number of pixels) to represent the Screen Area; e.g., change from a 1024 x 768 display to an 800 x 600 pixel display.
    2.Certain video drivers also support "acceleration" modes. Using a non-accelerated mode often eliminates the error. For
    Windows 95/98, right-click on your My Computer icon and select "Properties" from the pop-up
    menu. On the Performance tab, click the Graphics button and change the Hardware Acceleration (e.g., if it is set to "Full", lower the setting a notch or two); for Windows 2000/NT, right-click on your Desktop and select "Properties" from the pop-up menu. On the Settings tab, click the Advanced button and go to
    Troubleshooting.
    3.In Windows, the standard VGA driver provided by the operating system is very stable. Try using this driver in place of the specific one written for your video hardware. If the error is eliminated, there is likely a problem with your vendor-provided video driver.
    4.These errors are most often fixed with the latest
    video/printer driver. Be sure to contact your hardware manufacturer and install the latest driver. An easy way to determine if your error is "driver-related" is to move your code to another machine (and hopefully a different set of drivers) and see if th
    e error persists. If the problem is printer related, try another printer.
    5.Make sure there are at least 100M avalible space in your C: drive. If not, set the virtual memory to the other drive which has larger available space.

  • Making Buttons appear depending on the results of a SQL Query

    I need some help here I am still working on a time clock program
    I need help with the clock in and out buttons i need to know how to make
    the clock in button appear only if they are not clocked in. But I can not seem
    to make the sql statement or maybe my code is wrong, it needs to just get a
    count to see if they have any entries that have 0 in the hoursworked column
    and if so then it needs to just display the clock out if not then just the clockin button needs to be displayed this was my orignal code that was not working
    <%   
        String statement = "select count(*) as cnt from TimeSheet Where idnum = " + session.getAttribute("IDNUM");
        stmt.execute(statement);
        rs = stmt.getResultSet();
        rs.next();
        int num = rs.getInt("cnt");
        if (num == 0 || num == null)
        {%>
            <tr>
                <td><input type="submit" value="Clock In" name="button"></td>
            </tr>
        <%}
        else
        {%>
            <tr>
                <td><input type="submit" value="Clock Out" name="button"></td>
            </tr>
         <% } %>but it did not work it would only display the clock out button so i need to figure this out so that the user can not clock into the program twice to get double hours and so forth.

    Does it even compile ?Yes, it wouldnt, not even in 1.5
    it needs to just get a
    count to see if they have any entries that have 0 in the hoursworked column
    and if so then it needs to just display the clock out if not then just the clockin button needs to be displayed in which case,
    1. your sql is not correct.
    2. session.getAttribute("attrName") returns an Object - is the IDNUM column of type number
    (going by the fact that you have not enclosed the value in single quotes '')
    Assuming that you have a column called 'hoursworked' in table 'timesheet' and
    IDNUM is of type NUMBER
    <%
         Integer idNum = (Integer)session.getAttribute("IDNUM");
         //from the OP ::  get a count to see if they have any entries that have 0 in the hoursworked column
         String statement = "select count(*) as CNT from TIMESHEET where IDNUM = " + idNum + " and HOURSWORKED = 0 ";
         //remaining stuff :: Look out for the error pointed out by Pgeuens
         cheers,
    ram.

  • I have a catalog of 13.000 pictures, I have done an editing and done several sets. When I put the stars in a set, and chose to show the pictures with attributes it says there is no picture. Why ?

    So the problem is that I have a set of images with stars, and when I chose the filter, it does not show the pictures. I need this kind of workflow to edit such a massive ammount of pictures. I'm a documentary/street photographer and I mix the things.
    Any possible solution?

    Rated in Italian is Valutazione. No it does not work, that's the problem!

  • How to set my ipad to show the latest email first in each account when opening mail ?

    In one of my email accounts (@btinternet.com) when I open the mail display, the default setting is to have the oldest email on the account rather than the most recent. This means I have to annoyingly have to scroll up to the most recent. How can I configure so that on opening of the account, I am immediately taken to the newest email.
    Thank You

    Thank you, this has resolved both the iphone and ipad problem immediately.  I am concerned that I may have a problem with apps that I bought under my old  AppleID as they will not be recognised.  Any suggestions for this please?

  • HT4972 The PC I first set up my wifes IPAD on is no longer working and I have purchased a new computer, how do I make my IPAD recognize this new computer?

    I need to change the PC my wifes IPAN syncs with since the original one PC no longer works and I purchased a new computer

    Sync with new computer
    https://discussions.apple.com/docs/DOC-3141

Maybe you are looking for

  • Dynadock WUXGA monitor resolution

    I have a SAMSUNG 730U3E laptop connected to the Toshiba Dynadock U3.0 and have several hardware items connected to the dynadock like network cable, wireless mouse and keayboard and BenQ 24" WUXGA monitor. I haven't updated my drivers since January 20

  • Implicit call to java method

    Hi, I have a class composed by some methods, I want to find a way on for implicitly call a method in start and end of every method of my class without coding it. example this is my class : public class MyClass { public void a(){ public void b(){ call

  • Session variable using :GROUP variable in init block

    I'd like to filter using session variable. This session variaible should be build using :GROUP special session variable I'd like do something like this (init block): select  case when instr(upper(':GROUP'), 'ADMINISTRATOR')>0 then 'Yes' else 'No' end

  • Problem naming table with schema prefix in Trigger

    Hi, When i try to compile the trigger having that body : BEGIN Insert into TechDb.DocumentTransfers(DocumentNumber, DocumentTypeID, StaffCodeFrom, StaffCodeTo, TransferType, TransferDate) values (:New.DocumentNumber, :New.DocumentTypeID, :New.StaffCo

  • FCE crashes during Quicktime Export

    PPC G5 dual 10.4.9 FCE 3.5 QT 7.4.5 FCE consistently crashes when exporting clip as Quicktime Movie. I am new to FCE. When performing this Workflow (below), if I do NOT add the Zoom keyframes the clip exports fine. This is the Workflow that causes th