Oracle APPS Query for Natural Accoun in the Chart of account

Hello Guys,
I am working on a query to display the natural account listing in a report, I have made the below query
select  application_id ,SEGMENT_NAME, flex_value ACCOUNT_CODE , DESCRIPTION ACCOUNT_DESCRIPTION
from FND_FLEX_VALUES,FND_ID_FLEX_SEGMENTS ,fnd_flex_values_tl
where
FND_ID_FLEX_SEGMENTS.APPLICATION_ID='101'
AND SEGMENT_NAME='Natural Accounts'
and FND_FLEX_VALUES.FLEX_VALUE_SET_ID=FND_ID_FLEX_SEGMENTS.FLEX_VALUE_SET_ID
AND FND_FLEX_VALUES.FLEX_VALUE_ID=fnd_flex_values_tl.FLEX_VALUE_ID
Its showing me the correct values but there is repetition of record each row is displayed 4 times, I have checked the joins and fields but still cant find any idea what could be causing this duplication,
Any help will be appreciated
Regards              

Refer this query, you can get
select FIS.SEGMENT_NAME, FFV.FLEX_VALUE, FIF.ID_FLEX_STRUCTURE_CODE , FSA.*
from FND_SEGMENT_ATTRIBUTE_VALUES FSA, FND_ID_FLEX_SEGMENTS_VL FIS, FND_FLEX_VALUES_VL FFV, FND_ID_FLEX_STRUCTURES FIF
where FSA.attribute_value='Y'
and FSA.ID_FLEX_CODE = 'GL#'
and FSA.SEGMENT_ATTRIBUTE_TYPE = 'GL_ACCOUNT' --Natural Account Segment
and FIF.ID_FLEX_STRUCTURE_CODE='ACCOUNTING_FLEXFIELD'
and FSA.APPLICATION_COLUMN_NAME = FIS.APPLICATION_COLUMN_NAME
and FIS.FLEX_VALUE_SET_ID = FFV.FLEX_VALUE_SET_ID
and FIS.ID_FLEX_NUM=FIF.ID_FLEX_NUM
and FIS.ID_FLEX_CODE=FIF.ID_FLEX_CODE
AND FSA.ID_FLEX_CODE= FIF.ID_FLEX_CODE
and FSA.ID_FLEX_NUM=FIF.ID_FLEX_NUM
thanks

Similar Messages

  • Using Oracle Apps Adapter for apps_applcon user

    Hi,
    We are trying to use oracle apps adapter for our BPEL flows using FM11g (Jdev11gR1). We came to know that it will work for only apps user.
    We have apps_applcon user. How can we use that?
    Is there any way we can tell oracle apps adapter to user apps_applcon user?
    Any help would be greatly appreciated.
    Thanks in advance.
    Thanks & Regards,
    Rama Krishna. P

    We also have same requirement. We have BPEL connection using custom oracle user, xx_b2b and when we use APPS adapter, I can not see and use any business event.
    If anybody across same requirement, please share your experience.
    Appreciate help on this.
    Thanks,
    Sonartori

  • How can I obtain the Pages app which I previously purchased from the App store for Snow Leopard? The only download now available is for Mountain Lion which my computer can't run. Thanks

    How can I obtain the Pages app which I previously purchased from the App store for Snow Leopard? The only download now available is for Mountain Lion which my computer can't run. Thanks

    Try Amazon but look for the iWork suite of software. It's only sold separately as Pages, Keynote, and Numbers from the App Store.

  • I have multiple apple devices mainly used between me and my wife , my question is that can i have two sets of contacts backed up to icloud one for her devices and one for my devices using the same itunes account

    i have two sets of devices one ipad, iphone and mac which i use and one iphone ipad and mac which my wife uses
    now is it possible to have two sets of contacts and calendar synchronised for her devices and one for my devices using the same icloud account
    i dont want a separate itunes account as we use the same music books and apps to be automatically downloaded which is very convenient
    please guide

    You can set up different iCloud accounts on each device using different Apple IDs (to keep your mail, calendars, contacts, etc. separated), and still share the same iTunes account (in Settings>Store on your device).  There is no requirement that you use the same Apple ID for purchases and for iCloud.

  • Is it possible to change the chart of accounts in Oracle Financials?

    Dear Colleagues,
    Is it possible to change the chart of accounts in Oracle Financials?
    Thank you in advance.
    Andrey

    It is not an easy change. Oracle typically recommends against it but sometimes company structure or processes change so much that you are forced to do it.
    Take a look at http://www.vantagesolutions.com/media/SCOUG_May_2004.pdf as well as http://www.erpstuff.com/forums/topic.asp?TOPIC_ID=6381.
    If you google "change oracle chart of accounts", you will find some more hits as well. This is a big project.
    If you other business reasons to do a reimplementation, then changing COA as part of that will be very easy.
    For a lot of companies debating between reimplementation and upgrade, a need to change COA becomes the last straw in favor of reimplementation.
    Hope this helps,
    Sandeep Gandhi

  • Upgraded to Mavericks. Calendar.app asks for password to sync calendar to Exchange account. Exchange server rejects password.

    Upgraded to Mavericks. Calendar.app asks for password to sync calendar to Exchange account. Exchange server rejects password.  Had to go to Outlook (ugh!) in order to work (this suck!).  Please help!

    Wanted to chime in and say I'm having the same problem. Had to go back to Outlook which feels ancient. Hope Apple fixes this soon.

  • HT201084 I entered the wrong birth year for my child in the family share account. What can I do to correct it?

    I entered the wrong birth year for my child in the family share account. What can I do to correct it?

    press the blue arrow on your WiFi hub name and tell it to "forget this Network"
    Now go back to it and it should prompt for password

  • Report for cost centers with alternative chart of account

    Hi.
    I try to make a report in cost center accounting and in profit center accounting with alternative chart of accounts. We have primary chart of account for 20 companies and alternative chart of account for 1 company. How can I make a report in CO-OM and PC accounting with alternative accouns? Is there any metod? Are on the intrenet somewhere instructions?
    Thanks

    Marko,
    CCA reports are possible only by cost elements (which an have different description from a GL account).
    PCA reports are possible only for main account (alternative account not available in GLPCT table).

  • Cannot Open the chart of accounts

    Hi All,
    we are facing a strange issue on a customer site since this morning. We are unable to open the chart of accounts.. We tried to restart the client but the same issue is also occurring on the server for all the id's. We stopped all running add ons but still no use..
    HAs anyone seen this issue before and is there any solution??
    Please let me know.
    Thanks,
    Joseph

    Hi,
    Check the following query :
    SELECT T0.* FROM [dbo].[OACT] T0 WHERE T0.[Levels] = 1 ORDER BY T0.[GroupMask]
    This bring the number of head title accounts (drawers). If you have a backup of the database from earlier you can run the same query on it and compare the differences.
    I think there would be difference as the number of drawers in the database and the number from the query will not match.
    Check it please.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • How do I remove a account from the Chart Of Accounts oChartOfAccounts

    Hi,
    I would like to be able to remove a number accounts from the Chart Of Accounts table.
    I see in the help file for the SDK that the Remove() method of the ChartOfAccounts object is Not Supported and I do indeed get an exception when I call it (Object does not support this method or method not implemented).
    Is there another way to remove accounts from the SDK? I am using the SAP Business One DI API Version 8.8 SDK.
    Regards

    Hello,
    based on help, it is really not supported. You can remove via GUI (SAP B1 Client).
    Regards
    János

  • Harmonizing the Chart Of Accounts

    Hi Every Body,
    I have a slightly different question from one on my clients.
    They are interested in harmonizing the Chart of accounts.
    I have good idea , what should be done while harmonizing COA.
    But if some body can give me some inputs on Benchmarking's while harmonizing COA.
    When i say benchmarking , for eg: lets say AP control accounts , how many account codes we can have , based on what we will decide to have AP  control accounts.
    If i demystify my question , should i need to have one control account for every vendor or do I need to have a control accounts based on vendor type.
    Like above example , if some body can tell me the major areas in SAP FICO , i will create a benchmarking template based on your information.
    Thanks a lot in advance for all contributors.
    VjayGopal

    This mostly depends on the business processing and reporting requirements.  There is no hard and fast rule.  Sometimes, things are guided by the statutory requirements too, which must be adhered.
    For eg., you define the control accounts based on how you want to classify your reporting.  You can put all the vendor groups in a single control account or have separate control account based on vendor groups or types.  Say, for one time vendor different account than a regular vendor.  Or even a North territory Vendor posted to a different account as against a South territory Vendor.  Things are mostly guided by the business requirements.
    Ravi.

  • Error F5507 on MIRO. "The general master data of the G/L account 161000 is not maintained in the chart of accounts 1000"

    I was doing a MIRO w.r.t PO. I was getting the following error - "The general master data of the G/L account 161000 is not maintained in the chart of accounts 1000." I later went ahead and created the GL Account in the COA. now the error is recitified. But, I would like to know what happens in the background. 
    Could someone explain me this?  How is the G/L account determined?

    Hi,
    At the time of MIRO system posts below Accounting Entry:
    GR\IR Clearing Account Dr--> This will be picked from t-code OBYC- key WRX
    Vendor Account Cr--this will be picked from vendor master data
    If there are any tax or TDS involved then system post to those accounts as well.
    I guess 161000 is your recon account? Because if it is GR\IR then you would have got error at the tim e of MIGO ( if you have already done that)
    Hope this is clear to you.
    Br,Vivek

  • How to maintain the chart of accounts with the GL account number

    Hi to the entire group,
    can some let me know the process to maintain the chart of account with the GL account number.i am facing a problem when executing the interface in the batch job - it displays the message -- G/L account 2160371820 is not defined in chart of accounts XXXX.
    The GL account exists in the FS00 (both at chart of accounts & company code level) but when we use the report S_ALR_87012326, the GL account does not appear in the report.
    Kindly help me out.
    Advance Regards
    Harini

    HI
    Ex: In the chart of accounts u define account group Current asset from no.200200
          to 200299
    Know im creating Inventor account and Bank account
    i will goto fs00 GL account no .200200 HDFC Bank account
                  FS00 GL account no 200205  account group Current  assets
                   GL description Inventory A/C
    Regards
    Sure

  • HOWTO configure parameter options in oracle apps R11i for reports ??

    Hello
    I've developed a character report with orientation = landscape ,width=180 and height=66 on my laptop.It takes FROM DATE & TO DATE input from user which are passed to the sql query.
    KINDLY GUIDE ME IN CONFIGURING PARAMETERS OPTIONS TO RUN THIS REPORT IN ORACLE APPLICATIONS 11i.
    More what would the Token Option be in my case.
    I'm pasting the sql query and the last line indicated in bold takes parameter.I'm working in the HR & PAYROLL SCHEMA.
    SELECT DISTINCT
    PAPF.PERSON_ID AS "PERSON_ID",
         PAPF.BUSINESS_GROUP_ID,
    PAPF.TITLE,
         PAPF.FIRST_NAME,
         PAPF.MIDDLE_NAMES,
         PAPF.LAST_NAME,
    PGD.SEGMENT4 AS "GRADE",
         PPG.SEGMENT1 AS "GROUP_NAME",
    PPG.SEGMENT2 AS "DEPARTMENT",
    PPEMP.PEM_ATTRIBUTE8 AS "PREVIOUS_SALARY",
    PAC.SEGMENT2 AS "SALARY_OFFERED",
    PQFS.TITLE AS "QUALIFICATIONS",
         (SELECT
         SUM(PPEMP.PEM_INFORMATION1)
              FROM
              PER_PREVIOUS_EMPLOYERS PPEMP
              WHERE
              PPEMP.PERSON_ID=PAPF.PERSON_ID
              AND PPEMP.BUSINESS_GROUP_ID=3788
              ) AS "RELEVANT_EXPERIENCE",
              (SELECT
              SUM(PPEMP.PERIOD_YEARS) ||' '||'Y'||' '|| SUM(PPEMP.PERIOD_MONTHS)||' '||'M'          
              FROM
              PER_PREVIOUS_EMPLOYERS PPEMP
              WHERE
              PPEMP.PERSON_ID=PAPF.PERSON_ID
              AND PPEMP.BUSINESS_GROUP_ID=3788
              ) AS "TOTAL_EXPERIENCE",
              (SELECT PJD.SEGMENT4
                   FROM                
                                  PER_JOBS PJ,
                                  PER_JOB_DEFINITIONS PJD
    WHERE                         PAPF.PERSON_ID=PAAF.PERSON_ID
    AND                              PAAF.JOB_ID=PJ.JOB_ID                          
    AND                          PJ.JOB_DEFINITION_ID = PJD.JOB_DEFINITION_ID
    AND                          PJ.BUSINESS_GROUP_ID = 3788) AS "FUNCTIONAL_TITLE"
    FROM
    PER_ALL_PEOPLE_F PAPF,
    PER_ALL_ASSIGNMENTS_F PAAF,
         PER_JOBS PJ,
         PER_JOB_DEFINITIONS PJD,
    PAY_PEOPLE_GROUPS PPG,
    PER_GRADES PG,
         PER_GRADE_DEFINITIONS PGD,
    PER_QUALIFICATIONS PQFS,
    PER_PREVIOUS_EMPLOYERS PPEMP,      
    HR_ALL_ORGANIZATION_UNITS HRAOU,
         PER_PERSON_ANALYSES PPALYS,
         PER_ANALYSIS_CRITERIA PAC,
         APPS.FND_ID_FLEX_STRUCTURES FIFS,
         HR_LOCATIONS_ALL HLA,
         PER_APPLICATIONS PA
    WHERE PAPF.PERSON_ID = PAAF.PERSON_ID
    AND PAAF.GRADE_ID = PG.GRADE_ID
    AND PG.GRADE_DEFINITION_ID = PGD.GRADE_DEFINITION_ID
    AND PAAF.PEOPLE_GROUP_ID = PPG.PEOPLE_GROUP_ID
    AND     PAAF.JOB_ID (+)=PJ.JOB_ID
    AND PJ.JOB_DEFINITION_ID (+)=PJD.JOB_DEFINITION_ID
    AND PQFS.PERSON_ID (+)= PAPF.PERSON_ID
    AND PPEMP.PERSON_ID (+)= PAPF.PERSON_ID
    AND HRAOU.ORGANIZATION_ID (+)= PAAF.ORGANIZATION_ID
    AND PAPF.BUSINESS_GROUP_ID=3788
    AND PAPF.EFFECTIVE_END_DATE=TO_DATE('31/12/4712','DD/MM/RRRR')
    AND PAAF.EFFECTIVE_END_DATE=TO_DATE('31/12/4712','DD/MM/RRRR')
    AND PAPF.CURRENT_APPLICANT_FLAG='Y'
    AND PAAF.ASSIGNMENT_TYPE='A'
    --AND    HRAOU.ORGANIZATION_ID = PAAF.ORGANIZATION_ID
    AND nvl(PPEMP.END_DATE,TO_DATE('31/12/4712','DD/MM/RRRR'))=nvl((SELECT MAX(END_DATE)
    FROM PER_PREVIOUS_EMPLOYERS P
              WHERE PPEMP.PERSON_ID=P.PERSON_ID),TO_DATE('31/12/4712','DD/MM/RRRR'))
    AND PAPF.PERSON_ID=PPALYS.PERSON_ID
    AND PPALYS.ANALYSIS_CRITERIA_ID=PAC.ANALYSIS_CRITERIA_ID
    AND FIFS.ID_FLEX_NUM=PAC.ID_FLEX_NUM
    AND FIFS.STRUCTURE_VIEW_NAME='HIRING APPROVAL'
    AND HLA.LOCATION_ID=PAAF.LOCATION_ID
    AND PA.PERSON_ID=PAAF.PERSON_ID
    AND PAPF.EFFECTIVE_START_DATE between :From_Date And :To_Date

    Hi Dinesh
    I have some bad news for you I'm afraid. Discoverer workbooks are not stored as SQL definitions, they are stored as BLOBs within the database. It is therefore not possibly to write any sort of query to interrogate the inner workings of a workbook. The only way to do this is to open each workbook in turn and analyze it.
    Sorry to be the bringer of bad news
    Best wishes
    Michael

  • Oracle apps query-p2p cycle

    Hi all....
    I am using oracle 10g........
    The following query is a union of two queries....The second query is a subset of the first meaning that it has fewer tables and fewer select columns as well....(I have to use union on the two queries....for a gud reason) .What i want is that the union return only the superset records from result of the union of the two queries when i pass a parameter at runtime like supplier_name as mentioned in the the query below .......
    /* Formatted on 2012/05/14 16:49 (Formatter Plus v4.8.8) */
    SELECT * FROM(SELECT DISTINCT reql.unit_meas_lookup_code "UNIT",
    reqh.type_lookup_code "PR_TYPE",
    reql.document_type_code "SUBTYPE",
    reqh.segment1 "PR_NO", reqh.creation_date "PR DATE",
    mtb.segment1 "ITEM_CODE",
    pol.item_description "DESCRIPTION",
    mcb.segment1 "INVENTORY_CATEGORY",
    reql.manufacturer_part_number "MFG NO/DRG NO",
    poh.authorization_status "AUTHORIZATION STATUS",
    papf.full_name "BUYER", NULL "CUSTOMER",
    DECODE (poh.type_lookup_code,
    'RFQ', poh.segment1
    ) "RFQ NO",
    DECODE (poh.type_lookup_code,
    'RFQ', poh.creation_date
    ) "RFQ DATE",
    NULL "RFQ SUPPLIER",
    DECODE (poh.type_lookup_code,
    'QUOTATION', poh.segment1
    ) "QTN NO",
    DECODE (poh.type_lookup_code,
    'QUOTATION', poh.reply_date
    ) "QTN DATE",
    DECODE (poh.type_lookup_code,
    'STANDARD', poh.segment1,
    'BLANKET', poh.segment1,
    'PLANNED', poh.segment1
    ) "PO_NO",
    DECODE (poh.type_lookup_code,
    'STANDARD', poh.creation_date,
    'BLANKET', poh.creation_date,
    'PLANNED', poh.creation_date
    ) "PO DATE",
    pv.vendor_name "SUPPLIER",
    NULL "SUPPLIER ACKNOWLEDGMENT DATE",
    TRUNC
    (reqh.creation_date
    - TRUNC (poh.creation_date)
    "NO OF DAYS TAKEN FROM PR TO PO",
    DECODE (rcvh.asn_type,
    'ASBN', rcvh.shipment_num
    ) "ASBN NO",
    rcvh.receipt_num "RECEIPT NO",
    rcvh.creation_date "RECEIPT DATE",
    apia.invoice_num "INVOICE_NO",
    NULL "QUALITY INSPECTION DATE",
    rcvt.inspection_status_code "INSPECTION RESULT",
    NULL "STOCKING DATE",
    TRUNC (poh.creation_date)
    - TRUNC (reqh.creation_date) "NO OF DAYS TAKEN FROM",
    NULL "PV NO", NULL "PV DATE",
    apc.amount "PAYMENT RELEASE AMOUNT",
    apc.released_date "PAYMENT RELEASE DATE",
    apc.payment_method_code "PAYMENT RELEASE MODE",
    NULL "NO OF DAYS TAKEN FROM RECEIPT"
    FROM po_requisition_headers_all reqh,
    po_requisition_lines_all reql,
    po_req_distributions_all reqd,
    po_distributions_all pod,
    po_headers_all poh,
    po_lines_all pol,
    po_line_locations_all poll,
    rcv_shipment_headers rcvh,
    rcv_shipment_lines rcvl,
    rcv_transactions rcvt,
    ap_invoice_distributions_all apid,
    ap_invoices_all apia,
    ap_payment_schedules_all aps,
    ap_invoice_payments_all app,
    ap_checks_all apc,
    per_all_people_f papf,
    po_vendors pv,
    mtl_system_items_b mtb,
    mtl_categories_b mcb,
    mtl_item_categories mic
    WHERE reqh.requisition_header_id =
    reql.requisition_header_id
    AND reql.requisition_line_id = reqd.requisition_line_id
    AND pod.req_distribution_id = reqd.distribution_id
    AND pol.po_line_id = pod.po_line_id
    AND poh.po_header_id = pol.po_header_id
    AND pol.po_line_id = poll.po_line_id
    AND pod.po_distribution_id = apid.po_distribution_id
    AND pod.po_distribution_id = rcvt.po_distribution_id
    AND rcvl.shipment_header_id = rcvh.shipment_header_id
    AND rcvh.shipment_header_id = rcvt.shipment_header_id
    AND rcvt.po_distribution_id = apid.po_distribution_id
    AND app.check_id = apc.check_id
    AND apid.invoice_id = apia.invoice_id
    AND apia.invoice_id = app.invoice_id
    AND app.invoice_id = aps.invoice_id
    AND poh.agent_id = papf.person_id
    AND poh.vendor_id = pv.vendor_id
    AND pol.item_id = mtb.inventory_item_id
    AND mic.inventory_item_id = pol.item_id
    AND poh.authorization_status = 'APPROVED'
    AND mcb.category_id = mic.category_id
    UNION
    SELECT DISTINCT NULL "UNIT", NULL "PR_TYPE", NULL "SUBTYPE",
    NULL "PR_NO", NULL "PR DATE",
    mtb.segment1 "ITEM_CODE",
    pol.item_description "DESCRIPTION",
    mcb.segment1 "INVENTORY_CATEGORY", NULL,
    poh.authorization_status "AUTHORIZATION STATUS",
    papf.full_name "BUYER", NULL "CUSTOMER",
    DECODE (poh.type_lookup_code,
    'RFQ', poh.segment1
    ) "RFQ NO",
    DECODE (poh.type_lookup_code,
    'RFQ', poh.creation_date
    ) "RFQ DATE",
    NULL "RFQ SUPPLIER",
    DECODE (poh.type_lookup_code,
    'QUOTATION', poh.segment1
    ) "QTN NO",
    DECODE (poh.type_lookup_code,
    'QUOTATION', poh.reply_date
    ) "QTN DATE",
    DECODE (poh.type_lookup_code,
    'STANDARD', poh.segment1,
    'BLANKET', poh.segment1,
    'PLANNED', poh.segment1
    ) "PO_NO",
    DECODE (poh.type_lookup_code,
    'STANDARD', poh.creation_date,
    'BLANKET', poh.creation_date,
    'PLANNED', poh.creation_date
    ) "PO DATE",
    pv.vendor_name "SUPPLIER",
    NULL "SUPPLIER ACKNOWLEDGMENT DATE", NULL,
    DECODE (rcvh.asn_type,
    'ASBN', rcvh.shipment_num
    ) "ASBN NO",
    rcvh.receipt_num "RECEIPT NO",
    rcvh.creation_date "RECEIPT DATE",
    apia.invoice_num "INVOICE_NO",
    NULL "QUALITY INSPECTION DATE",
    rcvt.inspection_status_code "INSPECTION RESULT",
    NULL "STOCKING DATE", NULL, NULL "PV NO",
    NULL "PV DATE", apc.amount "PAYMENT RELEASE AMOUNT",
    apc.released_date "PAYMENT RELEASE DATE",
    apc.payment_method_code "PAYMENT RELEASE MODE",
    NULL "NO OF DAYS TAKEN FROM RECEIPT"
    FROM po_distributions_all pod,
    po_headers_all poh,
    po_lines_all pol,
    rcv_shipment_headers rcvh,
    rcv_shipment_lines rcvl,
    rcv_transactions rcvt,
    ap_invoice_distributions_all apid,
    ap_invoices_all apia,
    ap_payment_schedules_all aps,
    ap_invoice_payments_all app,
    ap_checks_all apc,
    per_all_people_f papf,
    po_vendors pv,
    mtl_system_items_b mtb,
    mtl_categories_b mcb,
    mtl_item_categories mic
    WHERE pol.po_line_id = pod.po_line_id
    AND poh.po_header_id = pol.po_header_id
    AND pod.po_distribution_id = apid.po_distribution_id
    AND pod.po_distribution_id = rcvt.po_distribution_id
    AND rcvl.shipment_header_id = rcvh.shipment_header_id
    AND rcvh.shipment_header_id = rcvt.shipment_header_id
    AND rcvt.po_distribution_id = apid.po_distribution_id
    AND app.check_id = apc.check_id
    AND apid.invoice_id = apia.invoice_id
    AND apia.invoice_id = app.invoice_id
    AND app.invoice_id = aps.invoice_id
    AND poh.agent_id = papf.person_id
    AND poh.vendor_id = pv.vendor_id
    AND pol.item_id = mtb.inventory_item_id
    AND mic.inventory_item_id = pol.item_id
    AND poh.authorization_status = 'APPROVED'
    AND mcb.category_id = mic.category_id) a
    WHERE 1 = 1
    AND ( a.pr_type = NVL (:pr_type, a.pr_type)
    OR (:pr_type IS NULL AND a.pr_type IS NULL)
    AND ( a.pr_no = NVL (:pr_no, a.pr_no)
    OR (:pr_no IS NULL AND a.pr_no IS NULL)
    AND ( a.unit = NVL (:unit_lookup_code, a.unit)
    OR (:unit_lookup_code IS NULL AND a.unit IS NULL)
    AND a.supplier = NVL (:supplier_name, a.supplier)
    AND a.inventory_category = NVL (:inventory_category, a.inventory_category)
    AND a.buyer = NVL (:buyer_name, a.buyer)
    AND a.invoice_no = NVL (:invoice_no, a.invoice_no)
    AND a.item_code = NVL (:item_code, a.item_code)
    Edited by: Dave on May 14, 2012 5:08 AM
    Edited by: Dave on May 14, 2012 5:14 AM

    Dave wrote:
    What i want is that the union return only the superset records from result of the union of the two queriesThat is what Union does.
    If it doesn't, then it means it's not real duplicates.
    For example :Scott@my11g SQL>with
      2  table_A(val) as (
      3  select 'This is a duplicate' from dual
      4  union all select 'This is another' from dual
      5  union all select 'This is not' from dual
      6  )
      7  ,table_B(val) as (
      8  select 'This is a duplicate' from dual
      9  union all select 'This is another' from dual
    10  )
    11  ------ end of sample data ------
    12  select val from table_A
    13  union
    14  select val from table_B ;
    Scott@my11g SQL>/
    VAL
    This is a duplicate
    This is another
    This is notSee ? only 3 rows from the 5 (3+2) originals.
    But if I add some pseudo columns Which_table with different values for each table, then :Scott@my11g SQL>with
      2  table_A(val) as (
      3  select 'This is a duplicate' from dual
      4  union all select 'This is another' from dual
      5  union all select 'This is not' from dual
      6  )
      7  ,table_B(val) as (
      8  select 'This is a duplicate' from dual
      9  union all select 'This is another' from dual
    10  )
    11  ------ end of sample data ------
    12  select val, 'from table_A' which_table from table_A
    13  union
    14  select val, 'from table_B' from table_B ;
    VAL                 WHICH_TABLE
    This is a duplicate from table_A
    This is a duplicate from table_B
    This is another     from table_A
    This is another     from table_B
    This is not         from table_AThere is now 5 rows, they are no longer duplicates.

Maybe you are looking for

  • How do you use Class Auto Create Parameter of Web Resource Type in WPC?

    In our project, we decided to use wpc for news implementation and we need that content web be  automatically  placed on a container. I saw the parameter, but I didn't find more helpful information Regards. null

  • How do you retrieve your numbers back from icloud if they disappear off your phone?

    My mom has an iPhone and it has deleted her contacts twice now. We need to know how to get her contacts back from icloud onto her phone.

  • Can't drag songs into a playlist

    Hey folks, I'm having trouble creating playlists and adding songs to playlists.  I've done this before (last year) but tonight I can't drag a song from iTunes store into an existing playlist and when I create a new playlist, it doesn't show up on the

  • Adobe CMM Black Point Compensation

    Hello list members, I have been trying out the Adobe CMM in combination with Adobe Photoshop. By testing the Black Point Compensation (BPC) preferences, I get strange results on my PowerMac. This is not happening on an IntelMac for me. The discussion

  • Airport connection between 2 Macs

    I have an iMac intel with OS 10.4.11 and a G4 Power Mac with OS 10.4.3 (need to upgrade) and I would like to network with airport. I have tried everything that I can find but with no success. Can anyone tell me in easy to follow steps how to make thi