Hacking application id equals() to allow more than one row per "primary key"

I have a read only entity whose primary key is not the real primary key
on the underlying table. The result is that I get more than one row per
"primary key". This is what I want. However KODO will not allow me do
it, because I am storing the collection in a HashSet() and the equals()
method on the application id object ensures that this set contains no
duplicates (as defined by the application id). At least thats how it
seems to behave.
So, I have hacked the equals() method to do this:
public boolean equals (Object ob)
if (this == ob)
return true;
// Doing this because we expect more than one row from
// REF_CODES for the same domain/shortCode combination.
// This is ok to do (I guess?) as long as we are only
// doing selects using this class.
return false;
Will this hack have any side effects? Is there another option? Like
using a list collection? Is so, which collections are supported?
Thanks,
Mike.

The "primary key" I am using it already a compound key of two columns.
The real key on the underlying table is a three column key. But the
problem is that the table represents two different application level
entities. I could deal with it when I was hand-writing SQL (I could do
a distinct for example) but now I am relying on foreign key
relationships since I moved to JDO. Not sure what to do. Best solution
is to rework the table, but there is a lot of legacy code (that other
teams use and maintain) relying on this table. I guess I'll use the
weekend for inspiration ;-)
Steve Kim wrote:
This sounds like a dangerous operation. Even if this works now, I
cannot promise future compatibility... and in fact may result in bad
data (for example in caching both at the PM and PMF level) Is there no
other field that you can reference as part of the primary key? Primary
Keys can be multi columned (e.g. last_name, soc_sec_number)
Mike Hogan wrote:
I have a read only entity whose primary key is not the real primary
key on the underlying table. The result is that I get more than one
row per "primary key". This is what I want. However KODO will not
allow me do it, because I am storing the collection in a HashSet() and
the equals() method on the application id object ensures that this set
contains no duplicates (as defined by the application id). At least
thats how it seems to behave.
So, I have hacked the equals() method to do this:
public boolean equals (Object ob)
if (this == ob)
return true;
// Doing this because we expect more than one row from
// REF_CODES for the same domain/shortCode combination.
// This is ok to do (I guess?) as long as we are only
// doing selects using this class.
return false;
Will this hack have any side effects? Is there another option? Like
using a list collection? Is so, which collections are supported?
Thanks,
Mike.

Similar Messages

  • How do I configure the Airport utility to allow more than one rule per port?

    How do I configure the Airport Utility (AU) to allow more than one rule per port?
    I am on a home network, with broadband cable modem.  I have my airport extreme connected to the broadband modem.  I have 2 servers in my home that need to be accessed remotely from time (SSH), and they also serve data for an iphone app, so I'm using a variety of protocols.  The problem I'm running into is that AU seems to only allow one rule per protocol, so if I go to add another address for access on a specific port that is being used by one of my servers, AU tells me "The Port Mapping Entry Already Exists". 
    I need to be able to allow SSH on both of my servers, for instance.  Am I missing something?  Is this doable with AU?
    Thanks for any insight.
    Khalid

    The Port Mapping "rules" on the AirPorts will allow you to: 1. Map a single port to a single IP address OR 2) Map multiple ports to a single IP address.
    What you won't be able to do is map a single or multiple ports to multiple IP addresses.

  • What if i need more than one prepareStatements per connection

    hi all!!
    Please take some time to look into this scenario.
    On the front end: User enters/ updates his/her records and submits. An ArrayList of object goes to backend.
    On back end: i have to loop for the size of the ArrayList submitted and see if some record is to be updated or inserted.
    Now at back end i do following steps:
    I have only one Connection object named connection.
    Step 1:
    query (say query1 )to see if the record in DB exists for the primary key as extracted from the element from ArrayList. So one prepareStatment ( say prepareStatement1) for this. I write a query and execute :
    prepareStatment1= connection.prepareStatement(query1);
    Step2 :
    A query ( say query2) to update Data in DB. And i have a separtae prepareStatement for this and i execute
    prepareStatment2 = connection.prepareStatement(query2);
    Sep3
    A query (say query3 )to insert Data in DB. And i have a separtae prepareStatement for this and i execute
    prepareStatment3 = connection.prepareStatement(query3);
    Step4:
    for: size of arraylist:
    1. take out the element at ith index from the list.
    2. see if the record exists i.e execute step1 and see if resultSet.next() is true.
    3. if record exists step2 applies so execute update query
    4. if record doesnot exist then go to step3 and execute insert query
    A weird thing happened .. insert was running fine but update was not. May be i was not checking appropriately. BUT the error that occurrd was that
    [Microsoft][ODBC SQL Server Driver]Connection is busy with
    results for another hstmt.
    So i changed my path and in loop i prepareStatement and execute query to see if record exists or not and store the result in some boolean variable and then close this prepareStatement. and if the result existed again prepare a statement for update or else prepare a statement for insert and execute the respective.
    and then again close this prepareStatement and go for next iteration of loop
    so each iteration i am preparing statement and then closing it BECAUSE Connection doesnot allow more than one statement per connection at one time. Am i right.??
    what should i do.? Although i have solved problem by closing and preparing in loop but that is so inefficient. Is there some elegant way???
    please reply.
    PS: I am using ms sql server 8.0 as my DBMS. I am developing web application using Sun Creator.

    No, you can use as many PreparedStatements as you like, all from one Connection, and you can keep them open as long as you like. (I do this with no problems.) Where you will run into problems is when you are trying to use two ResultSets at the same time. That's what the error message means, it just doesn't use JDBC terminology.

  • How do I use AE to allow more than one device with my cable modem?

    I connected by AE to my cable modem at my house in Japan and it works fine on "bridge mode," but only for one device at a time (this laptop, but not my iPod Touch, or vice versa). As soon as I connect a new device, it will kick the other one off. It seems that my cable modem here will only allow one device. Is there a way that I can use my Airport Extreme to allow more than one device and not have to pay the Internet provider extra for multiple IP addresses? How do I go about this? Do I select "share a public IP address" or do I select "distribute a range of IP addresses?" I tried these options but obviously wasn't doing it correctly, because then I lost the connection for everything... Thanks!

    It would be best if you "hard reset" the Airport Extreme to clear out the old and conflicting settings and then reconfigure it again.
    Hold in the reset button until you see the amber light begin to blink more quickly. Keep holding for another 3-4 seconds when you see this and then release the reset button. That will get the Extreme back to the original starting point.
    After you have powered the modem back up after the full reset, you will need to reconfigure the AirPort Extreme again. If you are using he guided setup in AirPort Utility, you will choose the option to "create a wireless network" during the setup.
    If you are using the Manual Setup, the Wireless Mode will be "Create a wireless network" and the setting for Connection Sharing would be "Share a public IP address". Adjusting the Connection Sharing setting would be the last thing that you do before you click Update to save settings.
    Here, I am assuming that you have a simple cable modem (it will have only one ethernet port), correct?

  • Should not allow more than one attendance or absence code on any given day

    Hi Hr Experts ,
    I need to use customer enhancement in my program.
    CATS should not allow more than one attendance or absence code on any given day. requirement is
    that each day will be either a full attendance or full absence and there will not be any mixture.
    Function/Program: u2022
         EXIT_SAPLCATS_006: CATS: Validate Entire Time Sheet
    transaction code CAT2.
    how to code the same?

    hai,
    check the Time constraint class for absence/attendance types.
    Regards,
    Chiran Reddy.

  • I have Elements 10. It doesn't handle RAW. It also doesn't allow more than one Fine JPG to be downloaded at a time. Can this be fixed with a download, or am I stuck to upgrade to Elements 13?

    I have Elements 10. It doesn't handle RAW. It also doesn't allow more than one Fine JPG to be downloaded at a time. Can this be fixed with a download, or am I stuck to upgrade to Elements 13?

    philips69374220 a écrit:
    I have Elements 10. It doesn't handle RAW.
    Yes, it does.
    FAQ: Will Photoshop Elements work with my camera, or Why won't my raw files open?
    It can handle the raw files covered by the ACR 6.7 version.
    For newer cameras, you can use the free Adobe DNGconverter to batch convert a folder into the DNG raw format that PSE10 can read and edit.
    (see the link in the upper document)
    Fine JPG to be downloaded at a time.
    All versions of Elements can open many jpegs at the same time, and the organizer lets you import as many as you want?

  • Is it possible to datamerge more than one image per page?

    I am building a product catalogue using datamerge.  Is it possible to data merge more than one image per page? (ie I have a logo, product image and dimensioned drawing to go with each product page)
    What would the coding be for the Data Field Name?
    Would it be
    @Logo
    @Product Image
    @Dimension Drawing
    Add image fields in the data source file
    By adding image fields to the data source file, you can allow a different image to appear on each merged record. For example, when you merge documents that include information from various companies, you may want to include an image of each company’s logo as part of the merge.
    Open the data source file.
    At the beginning of the data field name, type an “at” symbol (@) to insert text or paths that refer to image files.The @ symbol is required only in the first line; subsequent lines should include the image paths. Paths, which are case-sensitive, must follow the naming conventions of the operating system in which they’re stored.
    If you get an error message when you type the @ symbol at the beginning of the field, type an apostrophe (') before the @ symbol (such as '@Photos) to validate the function. Some applications, such as Microsoft Excel, reserve the @ symbol for functions. 
    (Windows) Example of image references in data source file
    Bill Tucker
    36
    C:\Photos\BillTucker.jpg
    Dat Nguyen
    53
    C:\MyDocuments\dat.gif
    Maria Ruiz
    26
    C:\Photos\Ruiz.psd
    (Mac OS) Example of image references in data source file
    Bill Tucker
    36
    Mac HD:Photos:BillTucker.jpg
    Dat Nguyen
    53
    Desktop:Family:dat.gif
    Maria Ruiz
    26
    Mac HD:Photos:Ruiz.psd
    You can use InDesign to view the path of an image on your operating system. Insert an image in an InDesign document, and then use the Links panel to view the image’s location. With the image selected, choose Copy Info > Copy Full Path from the Links panel menu. You may need to edit the path after you paste it in your data source. This technique is especially useful for images on a server. 

    anna-rees wrote:
    I am building a product catalogue using datamerge.  Is it possible to data merge more than one image per page? (ie I have a logo, product image and dimensioned drawing to go with each product page)
    What would the coding be for the Data Field Name?
    Would it be
    @Logo
    @Product Image
    @Dimension Drawing
    Yes, pretty much exactly as you describe. You would then just add those fields to the boxes in your page. I tend to add an apostrophe before the @ symbol in Excel so it doesn't think it's a function - as per text you quoted above.
    If you get an error message when you type the @ symbol at the beginning of the field, type an apostrophe (') before the @ symbol (such as '@Photos) to validate the function. Some applications, such as Microsoft Excel, reserve the @ symbol for functions.

  • Importing From Excel file will not import assignments correctly where there are more than one assignment per task

    I am trying to import an excel file ... see below.   It appears if you select both Tasks and Assignments tables it will not allow you to do this, says file is not in a project recognized format.  So I import Tasks tab first then run the
    wizard again and import the assignments tab while selecting merge with project option.   This works with one exception:
    If there are more than one assignment per task.  It does not merge in the 2nd assignment, only the first.
    Is there a way to import a task with 2 or more assignments?
    Background
    To figure out what the format for the file needed to be, I started with a MPP file and from project saved as Excel and selected the "Project Template" file.  Now I am trying to import that XLS to see how it works
    ID
    Active
    Task Mode
    Name
    Duration
    Start
    Finish
    Predecessors
    Outline Level
    1
    Yes
    Auto Scheduled
    DS001
    3 days
    June 17, 2014 8:00 AM
    June 19, 2014 5:00 PM
    1
    2
    Yes
    Auto Scheduled
    MT001
    3 days
    June 17, 2014 8:00 AM
    June 19, 2014 5:00 PM
    2
    3
    Yes
    Auto Scheduled
    CT001
    1 day
    June 17, 2014 8:00 AM
    June 17, 2014 5:00 PM
    3
    4
    Yes
    Auto Scheduled
    CT002
    2 days
    June 18, 2014 8:00 AM
    June 19, 2014 5:00 PM
    3
    3
    5
    Yes
    Auto Scheduled
    DS002
    1 day
    June 20, 2014 8:00 AM
    June 20, 2014 5:00 PM
    1
    6
    Yes
    Auto Scheduled
    MT002
    1 day
    June 20, 2014 8:00 AM
    June 20, 2014 5:00 PM
    2
    7
    Yes
    Auto Scheduled
    CT003
    1 day
    June 20, 2014 8:00 AM
    June 20, 2014 5:00 PM
    4
    3
    Task   Name
    Resource Name
    % Work Complete
    Work
    Units
    CT001
    Engineer1
    0
    8h
    100%
    CT002
    Engineer2
    0
    16h
    100%
    CT003
    Engineer1
    0
    8h
    100%
    CT003
    Engineer2
    0
    8h
    100%
    Andrew Payze

    Andrew,
    I did a quick test using your example although I didn't include the Predecessor or Outline Level fields to keep things a little simpler. I imported the Excel data into a new Project file with a single import of task and assignment data. It is very important
    to set up the Excel Workbook correctly. On Sheet 1 I entered the task data (Name, Duration, Start). I did not include the ID or finish date as that is redundant - Project generates its own ID and will calculate the finish date based on the start date and duration.
    On Sheet 2 I entered the assignment data basically just as you show it except I didn't include the Units.
    The data imported as expected.
    John

  • How to select more than one row in a JTable swing adf adf?

    how to select more than one row in a JTable swing adf adf?

    // Allow selection to span one contiguous set of rows, visible columns, or block of cells
    table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    // Allow multiple selections of rows, visible columns, or cell blocks
    table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

  • Single row subquery Returning more than one row

    Hi,
    This is urgent.............
    could u any one please suggest me on this query it returning single row subquey returnin more than one row
    In this 2nd suquery fails some of the order_numbers returning more than price_list based on dates and in that situvation also my query has to successfull
    fro that i added this condition l.ordered_quantity between trunc(product_attr_value_from) and (product_attr_value_to) for that condition also failing this query
    pls give me the correct condition to approach this solution
    select
    substr(party.party_name,1,13),
    c.account_number,
    substr(h.order_number||'-'||l.line_number||'-'||l.shipment_number,1,15),
    q.name,l.unit_selling_price,
    (select qll.operand
    apps.qp_list_headers qlh,
    apps.qp_list_lines qll,
    apps.qp_list_lines qllx
    apps.qp_pricing_attributes qpa,
    apps.qp_rltd_modifiers qrm,
    apps.mtl_system_items msi
    wherer qll.list_header_id=qlh.list_header_id
    and qpa.list_header_id=qlh.list_header_id
    and qpa.list_line_id=qll.list_line_id
    and qrm.rltd_modifier_grp_type='PRICE BREAK'
    and qll.list_line_id=qrm.to_rltd_modifier_id
    and qll.list_line_type_code='PLL'
    and qllx.list_header_id=qlh.lsit_header_id
    and qllx.list_line_id=qrm.from_rltd_modifier_id
    and qllx.list_line_type_code='PBH'
    and qlh.list_header_id=l.price_list_id
    and qpa.product_attr_value=msi.inventory_item_id
    and qpa.product_attr_value=l.inventory_item_id
    and msi.segment2 is null
    and msi.organization_id=89
    and trunc(l.request_date) between trunc(qllx.start_date_active) and trunc(nvl(qllx.end_date_active,sysdate))
    and l_ordered_quantity between qpa.pricing_attr_value_from and qpa.pricing_attr_value_to
    and qpa.product_uom_code=l.pricing_quantity_uom),
    substr(l.ordered_item,1,13),
    u.user_name,
    t.name,
    l.ordered_quantity,
    l.creation_date,
    l.request_date,
    l.pricing_date,
    l.flow_status_code
    from apps.oe_order_headers_all h,
    hz_cust_Accounts c,
    hz_parties party,
    apps.oe_order_lines_all l,
    apps.qp_list_headers_tl q,
    apps.qp_list_headers_b qb,
    apps.fnd_user u,
    apps.so_order_types_all t
    where h.header_id=l.header_id
    and h.sold_to_org_id=c.cust_account_id
    and c.party_id=party.party_id
    and trunc(l.request_date)!=trunc(l.pricing_date)
    and qb.attribute1='Q'
    and q.list_header_id=qb.list_header_id
    and l.price_list_id=q.list_header_id
    and l.flow_status_code=!='CANCELLED'
    AND t.name!='ECOM'
    and t.name!='RMA'
    and l.open_flag='Y'
    and l.item_type_code='MODEL'
    and u.user_id=l.created_by
    and t.order_type_id=h.order_type_id
    and u.user_name='XXCONVERSION'
    and (l.unit_selling_price -
    (select qll.operand
    from apps.qp_list_headers qlh,
    apps.qp_lsit_lines qll,
    apps.qp_list_lines qllx,
    apps.qp_pricing_attributes qpa,
    apps.qp_rltd_modifiers qrm,
    apps.mtl_system_items msi
    where qll.list_header_id=qlh.list_header_id
    and qpa.list_header_id=qlh.lsit_header_id
    and qpa.list_line_id=qll.list_line_id
    and qrm.rltd_modifier_grp_type='PRICE BREAK'
    AND qll.list_line_id=qrm.to_rltd_modifier_id
    and qll.list_line_type_code='PLL'
    and qllx.list_header_id=qlh.list_header_id
    and qllx.list_line_id=qrm.from_rltd_modifier_id
    and qllx.list_line_type_code='PBH'
    and qlh.list_header_id=l.price_list_id
    and qpa.product_attr_value=msi.inventory_item_id
    and qpa.product_Attr_value=l.inventory_item_id
    and msi.segmetn2 is null
    and msi.organization_id=89
    trunc(l.request_date) between trunc(qllx.start_date_active) and trunc(nvl(qllx.end_date_active,sysdate)) and
    and l.ordered_quantity between qpa.pricing_attr_value_from and qpa.pricing_attr_value_to
    and qpa.product_uom_code=l.pricing_quantity_uom)!=0)
    order by creation_date

    Hi,
    995631 wrote:
    Hi,
    This is urgent.............Then don't use this forum.
    could u any one please suggest me on this query it returning single row subquey returnin more than one row
    In this 2nd suquery fails some of the order_numbers returning more than price_list based on dates and in that situvation also my query has to successfullRemember, none of the people who want to help you are as familiar with your application as you are, so you have to explain things that are obvious to you.
    What does "sucessful" mean in this case? Does is mean producing the right results? What are the right results? How can you tell them apart from the wrong results?
    As the errror message says, the (immediate) problem is that a single-row sub-query is returning more than a single row. If the sub-query tries to bring back more than 1 row, which one do you want to use? Or do you want to use some kind of aggregate, such as the average, which might not be the same as any of them?
    Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Simplify the problem as much as possible. For example, remove all columns and tables that have nothing to do with the part you don't know how to do.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • Update gives "single-row subquery returns more than one row"

    Hi,
    I have to update a table by getting values from two other tables. While doing that the inner query returns more than one value. I am not sure how to implement the logic without returning more than one row in sub quesry. Need help on that.
    My query:
    update buf_office_str o
    set o.manager_ident =
    (select sp.ident
    from se2_r_src_sourceperson sp ,
    (select distinct director_name, team_name from buf_sales_dump )t
    where SP.SRCNAME = upper(substr(t.director_name,instr(t.director_name,' ')+1,length(t.director_name))||', '||substr(t.director_name,1,instr(t.director_name,' ')-1 ) )
    and o.office_descr = t.team_name
    Basically the query gets teh manager id from sp table where sp.srcname = t.team-name.
    The office descr should be equal to the team_name.
    This is the logic I am working towards:
    For each office, i get the office_descr and get corresponding team_name. Match the team's director_name (from table t) with the sp.name and return the employee's id (sp.ident) for that office_descr.
    I need to update all 50 offices with corresponding managerid for that office in buf_office_str table.
    Is it possible to get done in one update? Pls let me know.

    Hi,
    "Single-row subquery returns more than one row" is one of those error messages that actually means what it says: the correlated sub-query in your SET clause is sometimes returning 2 or more rows .
    The solution could be as simple as making the sub-query SELECT DISTINCT , as its in-line view, t, already is.
    It's possible you have bad data, or a mistake in your statement.
    To find the problem cases, you can run something like this:
    WITH  sub_q     AS
                       SELECT  -- DISTINCT ?
                                sp.ident
                       ,         t.team_name
                       ,         COUNT (*) OVER (PARTITION BY t.team_name)     AS cnt
                       FROM    se2_r_src_sourceperson     sp
                       ,         (  SELECT DISTINCT director_name
                                   ,                  team_name
                               FROM            buf_sales_dump
                             )                    t
                       WHERE   sp.srcname     = UPPER ( SUBSTR ( t.director_name
                                                         , INSTR ( t.director_name
                                                  ) + 1
                                                , LENGTH (t.director_name)
                                          || ', '
                                          || SUBSTR ( t.director_name
                                                          , 1
                                                   , INSTR ( t.director_name
                                                        ) - 1
    SELECT     o.*     -- or whatever helps you
    ,     sq.*
    FROM     buf_office_str     o
    JOIN     sub_q          sq     ON     o.office_descr = sq.team_name
    WHERE     sq.cnt          > 1
    ;If you'd like more help, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables as they exist before the UPDATE, and the results you want from that data (that is, the contents of buf_office_str after the UPDATE). Make sure the problem occurs with the sample data you post.

  • TWO ERRO ORA-01427: single-row subquery returns more than one row

    Hi,
    I have a procedure which contains a cursor. If i run the select statement in the cursor separetly, it returns only value and works fine. But the same select statement in the cursor of a procedure throws me the error as below:
    TWO ERRO ORA-01427: single-row subquery returns more than one row
    Not sure what going on...any help appreciated.
    Below is the select statement:
    SELECT DISTINCT PSE.PARENT_POSITION_ID,
    (SELECT DISTINCT PPD1.SEGMENT2
    FROM PER_POSITION_DEFINITIONS PPD1,
    HR_ALL_POSITIONS_F HAPF2,
    PER_POS_STRUCTURE_ELEMENTS PSE2
    WHERE TRUNC(SYSDATE) BETWEEN
    HAPF2.EFFECTIVE_START_DATE AND
    HAPF2.EFFECTIVE_END_DATE
    AND PPD1.POSITION_DEFINITION_ID =
    HAPF2.POSITION_DEFINITION_ID
    AND
    HAPF2.POSITION_ID = PSE2.PARENT_POSITION_ID
    AND PSE2.PARENT_POSITION_ID =
    PSE.PARENT_POSITION_ID
    AND ROWNUM = 1) SEGMENT2,
    (SELECT DISTINCT PAPF1.FIRST_NAME || ' ' ||
    PAPF1.LAST_NAME CHIEF_NAME
    FROM PER_ALL_PEOPLE_F PAPF1,
    PER_ALL_ASSIGNMENTS_F PAAF1
    WHERE TRUNC(SYSDATE) BETWEEN
    PAPF1.EFFECTIVE_START_DATE AND
    PAPF1.EFFECTIVE_END_DATE
    AND TRUNC(SYSDATE) BETWEEN
    PAAF1.EFFECTIVE_START_DATE AND
    PAAF1.EFFECTIVE_END_DATE
    AND PAAF1.POSITION_ID = PSE.PARENT_POSITION_ID
    AND PAPF1.PERSON_ID = PAAF1.PERSON_ID
    AND ROWNUM = 1) CHIEF_NAME
    FROM PER_POS_STRUCTURE_ELEMENTS PSE,
    HR_ALL_POSITIONS_F HAPF,
    PER_POSITION_DEFINITIONS PPD
    WHERE PSE.SUBORDINATE_POSITION_ID = 52744
    AND TRUNC(SYSDATE) BETWEEN HAPF.EFFECTIVE_START_DATE AND
    HAPF.EFFECTIVE_END_DATE
    AND HAPF.POSITION_ID = PSE.SUBORDINATE_POSITION_ID
    AND HAPF.POSITION_DEFINITION_ID = PPD.POSITION_DEFINITION_ID;
    Thanks
    PK
    Edited by: user539616 on Jun 30, 2009 6:30 PM

    Hi,
    The cursor has a different parameter? Maybe the query is not exactly the same. Could you check this?
    This is your query (formatted):
    SELECT DISTINCT PSE.PARENT_POSITION_ID,
                    (SELECT DISTINCT PPD1.SEGMENT2
                       FROM PER_POSITION_DEFINITIONS   PPD1,
                            HR_ALL_POSITIONS_F         HAPF2,
                            PER_POS_STRUCTURE_ELEMENTS PSE2
                      WHERE TRUNC(SYSDATE) BETWEEN HAPF2.EFFECTIVE_START_DATE AND
                            HAPF2.EFFECTIVE_END_DATE
                        AND PPD1.POSITION_DEFINITION_ID = HAPF2.POSITION_DEFINITION_ID
                        AND HAPF2.POSITION_ID = PSE2.PARENT_POSITION_ID
                        AND PSE2.PARENT_POSITION_ID = PSE.PARENT_POSITION_ID
                        AND ROWNUM = 1) SEGMENT2,
                    (SELECT DISTINCT PAPF1.FIRST_NAME || ' ' || PAPF1.LAST_NAME CHIEF_NAME
                       FROM PER_ALL_PEOPLE_F      PAPF1,
                            PER_ALL_ASSIGNMENTS_F PAAF1
                      WHERE TRUNC(SYSDATE) BETWEEN PAPF1.EFFECTIVE_START_DATE AND
                            PAPF1.EFFECTIVE_END_DATE
                        AND TRUNC(SYSDATE) BETWEEN PAAF1.EFFECTIVE_START_DATE AND
                            PAAF1.EFFECTIVE_END_DATE
                        AND PAAF1.POSITION_ID = PSE.PARENT_POSITION_ID
                        AND PAPF1.PERSON_ID = PAAF1.PERSON_ID
                        AND ROWNUM = 1) CHIEF_NAME
      FROM PER_POS_STRUCTURE_ELEMENTS PSE,
           HR_ALL_POSITIONS_F         HAPF,
           PER_POSITION_DEFINITIONS   PPD
    WHERE PSE.SUBORDINATE_POSITION_ID = 52744
       AND TRUNC(SYSDATE) BETWEEN HAPF.EFFECTIVE_START_DATE AND HAPF.EFFECTIVE_END_DATE
       AND HAPF.POSITION_ID = PSE.SUBORDINATE_POSITION_ID
       AND HAPF.POSITION_DEFINITION_ID = PPD.POSITION_DEFINITION_ID;Tips: To put formatted code you must use {noformat}{noformat} tags, start tag and end tag are the same,you don't need to put '/' in the close tag.
    Regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Can I have more than one iphone per email account?

    When my son got his iphone 4s I used my email address since he didnt have one yet.  I have since gotten an Iphone 4s also, but when I went to activate it I had to put it under another email account, since mine was used for my sons iphone, so I used my husbands.  My husband now has an iphone on order and I was wondering if there was a way of having more than one phone per email account?

    I would set up a new email for him.  That will give you a new icloud account.  Also any apps that he downloaded with your ID will forever be linked to that ID and can only be updated with that ID.  If that is a problem then you might delete those apps and download them again with the new ID ( and if they were paid apps you need to pay again)

  • Using a ommand to generate more than one row of data in utl file

    Hi Guys
    This might be a pretty long one. But I require help with regards to using outer and inner loops within my code.
    Here is the task:
    Each account involved with the DCA Allocation has an entry in the DCAACCOUNTALLOCATION table to track its progress. The STATUS value of the entry shows the position of the account in the DCA Allocation process.
    The status entry being tested is 3.
    Below is the code:
    create or replace
    PROCEDURE DCA_BMW_OUT
    IS
    -- Declare all variables as reference
    v_out_file UTL_FILE.FILE_TYPE;
    v_row_Count NUMBER;
    r_bmw NUMBER;
    v_out_directory all_directories.directory_path%type;
    v_out_filehandle UTL_FILE.FILE_TYPE := NULL;
    v_out_buffer varchar2 (32767);
    v_records NUMBER;
    body_output varchar2(32759 BYTE);
    dictionary_guarantorsexist varchar2 (1 Char);
    -- Text required within this part of the procedure
    v_body varchar2(32767 BYTE);
    v_header VARCHAR2(32759 BYTE);
    BEGIN
    FOR r_bmw IN
    ( SELECT *
    FROM dcaadditionaldata
    WHERE directory_name IS NOT NULL
    ) LOOP
    BEGIN
    -- Output file to be added into the directory specified
    v_out_file := utl_file.fopen (r_bmw.directory_name, 'DCAExport_1_' || TRIM(TO_CHAR(SYSDATE,'DDMMYYYY_HH24MISS')) || '.txt', 'W');
    -- The Header data which will be outputted to the file
    v_header := 'KennzeichenBrgschaftsforderungGesamtforderung|Währung|Übergabedatum|DifferenzierungAnwalts-oderInkassofall|MainMarktpartnernummer|
    MainAnrede|MainTitel|MainName|MainVorname|MainStraße|MainHausnummer|MainPLZ|MainOrt|MainLand|MainGeburtsdatum|MainTelefonnr.Schuldner|G1Marktpartnernummer
    G1Anrede      G1Titel      G1Name      G1Vorname      G1Straße      G1Hausnummer      G1PLZ      G1Ort      G1Land      G1Geburtsdatum      G1Telefonnr.Schuldner      G2Marktpartnernummer      G2Anrede      G2Titel
    G2Name|G2Vorname|G2Straße|G2Hausnummer|G2PLZ|G2Ort|G2Land|G2Geburtsdatum|G2Telefonnr.Schuldner|G3Marktpartnernummer|G3Anrede|G3Titel|G3Name|G3Vorname|
    G3Straße|G3Hausnummer|G3PLZ|G3Ort|G3Land|G3Geburtsdatum|G3Telefonnr.Schuldner|G4Marktpartnernummer|G4Anrede|G4Titel|G4Name|G4Vorname|G4Straße|G4Hausnummer|
    G4PLZ|G4Ort|G4Land|G4Geburtsdatum|G4Telefonnr Schuldner|G5Marktpartnernummer|G5Anrede|G5Titel|G5Name|G5Vorname|G5Straße|G5Hausnummer|G5PLZ|G5Ort|G5Land|
    G5Geburtsdatum|G5Telefonnr.Schuldner|Kundennr.|Bestandsnr.|Finanzierungsnr.|KennzeichenFinanzierung/Leasing|Kennzeichenprivat/gewerblich|
    reguläresVertragsende|Laufzeit|Vertragsdatum|Vertragsstatus|Ratenbetrag|Filiale/Gebiet|Finanzierungstyp|BankverbindungKonto|BankverbindungBLZ|
    RSVKennzeichen|Kündigungsdatum|Modell|Fahrgestellnummer|KFZKennzeichen|KFZZulassungsdatum|CoD1Marktpartnernummer|CoD1Anrede|CoD1Titel|CoD1Name|
    CoD1Vorname|CoD1Straße|CoD1Hausnummer|CoD1PLZ|CoD1Ort|CoD1Land|CoD1Geburtsdatum|CoD1Telefonnr.Schuldner|CoD2Marktpartnernummer|CoD2Anrede|CoD2Titel|
    CoD2Name|CoD2Vorname|CoD2Straße|CoD2Hausnummer|CoD2PLZ|CoD2Ort|CoD2Land|CoD2Geburtsdatum|CoD2Telefonnr.Schuldner|CoD3Marktpartnernummer|CoD3Anrede|
    CoD3Titel|CoD3Name|CoD3Vorname|CoD3Straße|CoD3Hausnummer|CoD3PLZ|CoD3Ort|CoD3Land|CoD3Geburtsdatum|CoD3Telefonnr.Schuldner|CoD4Marktpartnernummer|
    CoD4Anrede|CoD4Titel|CoD4Name|CoD4Vorname|CoD4Straße|CoD4Hausnummer|CoD4PLZ|CoD4Ort|CoD4Land|CoD4Geburtsdatum|CoD4Telefonnr.Schuldner|
    CoD5Marktpartnernummer|CoD5Anrede|CoD5Titel|CoD5Name|CoD5Vorname|CoD5Straße|CoD5Hausnummer|CoD5PLZ|CoD5Ort|CoD5Land|CoD5Geburtsdatum|
    CoD5Telefonnr.Schuldner Y|Y|5830,99|EUR|20/08/2009|DCA|4|123456|Herr||Mueller|Rainer|Messigasse|33|84432|Filz|Deutschland|01/07/1957|08912345|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||||||||||||||76543|5000234567||Lease|Privat|12/12/2013|60|12/12/2008||250,50|US|Rate|1234567890|32343450|N||BMW 320 i|W34567890PA34567|M-H-3456|09/12/2008||||||||||||||||||||||||
    N|450,80|EUR|20/08/2009|DCA|4|987654|Frau||Meier|Heide|Beinstr.|44|86353|Laus|Deutschland|03/06/1949|08987654|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||87654||8765675585|Loan|Gewerblich|14/03/2012|72|14/03/2006||500,01|DF|Select|976579657|32343450|N||BMW 500 sl|W94567890PA34568|M-H-3457|10/03/2006|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345
    Y|33970,50|EUR|20/08/2009|Lawyer|4|64646464|Frau||Schmidt|Susanne|Hueftgasse|55|89363|Maus|Deutschland|23/08/1933|08934567|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||98757|5000785675||Lease|Privat|11/11/2009|48|11/11/2005||380,70|GH|Zielrate|234567899|32343450|Y||BMW 380 s|W54567890PA34569|M-H-3458|07/11/2005||||||||||||||||||||||||
    N|10040,20|EUR|20/08/2009|Lawyer|4|4865465|Herr||Schulz|Karl|Nasenweg|77|83354|Schuh|Deutschland|18/01/1965|08972545|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||46789|50004765787||Lease|Privat|16/09/2012|60|16/09/2007||1234,56|OS|ZUS|98765432|32343450|Y||BMW 280 i|W74567890PA34570|M-H-3459|12/09/2007||||||||||||||||||||||||';
    utl_file.PUT_LINE(v_out_file,v_header,TRUE);
    -- Below will output a row of data which satisfy the requirements.
    FOR body_output IN
    ( SELECT
    AccountDetails.CUSTOMERNUMBER, AccountDetails.ACCOUNTNUMBER, CUSTOMERDETAILS.CDTITLE, CUSTOMERDETAILS.CDFIRSTNAME, CUSTOMERDETAILS.CDLASTNAME, AccountDetails.ACCOUNTTYPE,
    AccountDetails.ORIGINALCONTRACTENDDATE, AccountDetails.CONTRACTTERM, AccountDetails.CONTRACTENDDATE, AccountDetails.BRANCHAREA, AccountDetails.PRODUCTTYPE,
    AccountDetails.HOUSEBANKACCOUNT, AccountDetails.CARMODEL, AccountDetails.CARLICENCE, AccountDetails.ARREARSBALANCE, AccountDetails.CODEBTOR, AccountDetails.GUARANTORNUMBER
    FROM AccountDetails
    JOIN CUSTOMERDETAILS ON AccountDetails.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
    WHERE EXISTS
    ( SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.dcaid = 41
    AND Dcaaccountallocation.status = 3
    AND DebtEpisodes.DCASentDate IS NULL
    AND Dcaaccountallocation.ACCOUNTID = AccountDetails.ACCOUNTNUMBER
    AND DebtEpisodes.DCAORLAWYER = 'DCA'
    LOOP
    UTL_FILE.PUT_LINE (v_out_file,
    body_output.CUSTOMERNUMBER|| '|' || body_output.ACCOUNTNUMBER|| '|' ||body_output.CDTITLE|| '||' ||body_output.CDFIRSTNAME || '|||||' ||
    body_output.CDLASTNAME|| '||||' || body_output.ACCOUNTTYPE|| '|' ||body_output.ORIGINALCONTRACTENDDATE|| '||||' ||body_output.CONTRACTTERM || '|||||' ||
    body_output.CONTRACTENDDATE|| '|' || body_output.BRANCHAREA|| '||' ||body_output.PRODUCTTYPE|| '||' ||
    body_output.HOUSEBANKACCOUNT|| '|||' || body_output.CARMODEL|| '||||' ||body_output.CARLICENCE|| '|' ||
    body_output.ARREARSBALANCE|| '||||' || body_output.CODEBTOR|| '|' ||body_output.GUARANTORnumber);
    END LOOP;
    UTL_FILE.fclose (v_out_file);
    EXCEPTION
    WHEN OTHERS THEN
    UTL_FILE.put_line (v_out_file, 'failed');
    -- If any errors occur when closing the file, then we close the opened file.
    IF utl_file.is_open(v_out_file) THEN
    UTL_FILE.fclose (v_out_file);
    END IF;
    END;
    UPDATE DebtEpisodes
    SET handoverdate = null
    WHERE DCAORLAWYER = 'DCA'
    AND accountid IN
    ( SELECT accountid
    FROM Dcaaccountallocation
    WHERE Dcaaccountallocation.status = 3
    AND Dcaaccountallocation.dcaid = 41
    END LOOP;
    END DCA_BMW_OUT;
    Currently, the above codes issue is that although many rows of data have been inputted in all the tables, with regards to the select criteria above (in italics), it only produces one row of data when i expect more than one to appear.
    If the query only outputs one row but you're expecting it to produce more than one row, then you need to dissect the statement to find out where the output is being unduly restricted
    I was told maybe an outerloop or an inner loop would do the trick, but really stuck on how and where to put it.
    Hope this makes sense guys and I would really appreciate your time.
    Thanks

    if i run this particular code
    ( SELECT
    AccountDetails.CUSTOMERNUMBER, AccountDetails.ACCOUNTNUMBER, CUSTOMERDETAILS.CDTITLE, CUSTOMERDETAILS.CDFIRSTNAME, CUSTOMERDETAILS.CDLASTNAME, AccountDetails.ACCOUNTTYPE,
    AccountDetails.ORIGINALCONTRACTENDDATE, AccountDetails.CONTRACTTERM, AccountDetails.CONTRACTENDDATE, AccountDetails.BRANCHAREA, AccountDetails.PRODUCTTYPE,
    AccountDetails.HOUSEBANKACCOUNT, AccountDetails.CARMODEL, AccountDetails.CARLICENCE, AccountDetails.ARREARSBALANCE, AccountDetails.CODEBTOR, AccountDetails.GUARANTORNUMBER
    FROM AccountDetails
    JOIN CUSTOMERDETAILS ON AccountDetails.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
    WHERE EXISTS
    ( SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.dcaid = 41
    AND Dcaaccountallocation.status = 2
    AND DebtEpisodes.DCASentDate IS NULL
    AND Dcaaccountallocation.ACCOUNTID = AccountDetails.ACCOUNTNUMBER
    AND DebtEpisodes.DCAORLAWYER = 'DCA'
    This returns 1 row of data
    However if i run a small part of the above code...
    SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.dcaid = 41
    AND Dcaaccountallocation.status = 2
    It returns a lot of rows with a status of 2
    Now i presume what I am going to do is to ensure that all the fields provide satisfactory requirements, with regards to the above code. Although I have many records in all the stated tables already.
    :(

  • How to find out which sub query returns more than one row

    Hi all,
    Can any one give me clue ,how to find out which sub query returns more than one row in the following query .
    /* Formatted on 2011/05/17 19:22 (Formatter Plus v4.8.8) */
    SELECT a.*, ROWNUM AS rnm
      FROM (SELECT DISTINCT '1' AS "Page View", ou.org_unit_name AS "Org",
                            prxm.mbr_idntfr AS "Beneficiary ID",
                               md.last_name
                            || ', '
                            || md.first_name AS "Beneficiary Name",
                            pci.idntfr AS "Tracking No.",
                            TO_CHAR (TRUNC (req.pa_rqst_date),
                                     'MM/dd/yyyy'
                                    ) AS "Request Date",
                            sts.status_name AS "Status",
                            req.pa_rqst_sid AS "Request #",
                            prxm.mbr_sid AS "Mbr_sid",
                            TO_CHAR
                                  (TRUNC (req.pa_revision_date),
                                   'MM/dd/yyyy'
                                  ) AS "Last Updated",
                            TO_CHAR (psd.TO_DATE, 'MM/dd/yyyy') AS "TO_DATE",
                            prxpl.prvdr_lctn_iid AS "PRVDR_LCTN_IID",
                            pd.prvdr_sid AS "PRVDR_SID", 'Y' AS "State View",
                            DECODE
                               ((SELECT DISTINCT pd.national_prvdr_idntfr
                                            FROM pa_request_x_provider_location prxplo
                                           WHERE prxplo.pa_rqst_sid =
                                                                   req.pa_rqst_sid
                                             AND prxplo.oprtnl_flag = 'A'
                                             AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
                                0, (SELECT prxplo.prvdr_lctn_idntfr
                                      FROM pa_request_x_provider_location prxplo
                                     WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
                                       AND prxplo.oprtnl_flag = 'A'
                                       AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
                                NULL, (SELECT prxplo.prvdr_lctn_idntfr
                                         FROM pa_request_x_provider_location prxplo
                                        WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
                                          AND prxplo.oprtnl_flag = 'A'
                                          AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
                                (SELECT DISTINCT pd.national_prvdr_idntfr
                                            FROM pa_request_x_provider_location prxplo
                                           WHERE prxplo.pa_rqst_sid =
                                                                   req.pa_rqst_sid
                                             AND prxplo.oprtnl_flag = 'A'
                                             AND prxplo.pa_prvdr_type_lkpcd = 'RR')
                               ) AS "NPI/ID",
                            DECODE
                               ((SELECT pd.org_bsns_name
                                   FROM pa_request_x_provider_location prxplo
                                  WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
                                    AND prxplo.oprtnl_flag = 'A'
                                    AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
                                NULL, (SELECT    pd.last_name
                                              || ', '
                                              || pd.first_name
                                              || ' '
                                              || pd.middle_name
                                         FROM pa_request_x_provider_location prxplo
                                        WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
                                          AND prxplo.oprtnl_flag = 'A'
                                          AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
                                (SELECT pd.org_bsns_name
                                   FROM pa_request_x_provider_location prxplo
                                  WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
                                    AND prxplo.oprtnl_flag = 'A'
                                    AND prxplo.pa_prvdr_type_lkpcd = 'RR')
                               ) AS "Prvdr Name",
                            TO_CHAR (psd.from_date,
                                     'MM/dd/yyyy'
                                    ) AS "Srvc From Date",
                            TO_CHAR (req.validity_start_date,
                                     'MM/DD/YYYY'
                                    ) AS "Due Date",
                            (fn_get_busniess_days (TRUNC (req.validity_start_date))
                            ) AS "Days<br>Left",
                            req.pa_mode_type_lkpcd AS "Source",
                            TO_CHAR (TRUNC (wmdtl.rtng_date),
                                     'MM/dd/yyyy'
                                    ) AS "Assigned On",
                            NVL (wmdtl.assigned_to_user_name,
                                 'Not Assigned'
                                ) AS "Assigned To",
                            req.org_unit_sid AS "OrgUnitSid",
                            TO_CHAR
                                 (wmdtl.modified_date,
                                  'MM/dd/yyyy hh24:mi:ss'
                                 ) AS "WTRD_MODIFIED_DATE",
                            TO_CHAR (wmdtl.rtng_date,
                                     'MM/dd/yyyy'
                                    ) AS "WTRD_RTNG_DATE",
                            req.status_cid AS "PA_STATUS_CID",
                            TO_CHAR (req.modified_date,
                                     'MM/dd/yyyy'
                                    ) AS "PA_REQ_MODIFIED_DATE",
                            prs.state_pa_srvc_type_code
                                                     AS "STATE_PA_SRVC_TYPE_CODE",
                            wmdtl.wm_pa_task_rtng_dtl_sid
                                                        AS "WM_TASK_RTNG_DTL_SID",
                            wmdtl.assigned_to_user_acct_sid
                                              AS "WTRD_Assigned_to_user_acct_sid",
                            (fn_get_busniess_days (TRUNC (req.validity_start_date))
                            ) AS "Days<br>LeftSort",
                            wmdtl.assigned_to_org_unit_sid
                                                  AS "WTRD_Assigned_to_OrgUntSid",
                            DECODE
                               ((SELECT COUNT (*)
                                   FROM pa_request_status prs
                                  WHERE prs.pa_rqst_sid = req.pa_rqst_sid
                                    AND prs.status_cid = 5
                                    AND prs.oprtnl_flag = 'I'),
                                0, 'N',
                                'Y'
                               ) AS "SHOW_UTILIZATION"
                       FROM   pa_request req,
                             pa_certification_identifier pci,
                             status sts,
                             pa_request_x_member prxm,
                             wm_pa_task_routing_detail wmdtl,
                             pa_service_date psd,
                             org_unit ou,
                             pa_request_service prs,
                             pa_request_x_provider_location prxpl,
                             provider_location pl,
                             provider_detail pd,
                             provider p,
                             mbr_dmgrphc md
                      WHERE req.oprtnl_flag = 'A'
                        AND req.status_cid NOT IN
                                     (20, 30, 70, 25, 80, 96, 85, 5, 97, 98, 101)
                        AND req.org_unit_sid IN
                               (3057, 3142, 3058, 3143, 3059, 3144, 3060, 3145,
                                3061, 3146, 3062, 3147, 3063, 3148, 3064, 3149,
                                3065, 3150, 3066, 3151, 3067, 3152, 3068, 3153,
                                3069, 3154, 3070, 3155, 3071, 3156, 3072, 3157,
                                3073, 3158, 3074, 3159, 3075, 3160, 3076, 3161,
                                3077, 3162, 3078, 3163, 3079, 3164, 3080, 3165,
                                3081, 3166, 3082, 3167, 3083, 3168, 3084, 3169,
                                3085, 3170, 3086, 3171, 3087, 3172, 3088, 3173,
                                3089, 3174, 3090, 3175, 3091, 3176, 3092, 3177,
                                3093, 3178, 3094, 3179, 3095, 3180, 3096, 3181,
                                3097, 3182, 3098, 3183, 3099, 3184, 3100, 3185,
                                3101, 3186, 3102, 3187, 3103, 3003, 75000104,
                                75000108, 2006, 75000103, 75000102, 75000113,
                                75000111, 75000109, 2001, 2009, 75000105,
                                75000107, 2004, 2010, 2013, 2014, 2005, 2011,
                                75000112, 2002, 1001, 2012, 75000106, 2007,
                                75000101, 2003, 75000110, 2008, 3001, 3002, 3019,
                                3104, 3020, 3105, 3021, 3106, 3022, 3107, 3023,
                                3108, 3024, 3109, 3025, 3110, 3026, 3111, 3027,
                                3112, 3028, 3113, 3029, 3114, 3030, 3115, 3031,
                                3116, 3032, 3117, 3033, 3118, 3034, 3119, 3035,
                                3120, 3036, 3121, 3037, 3122, 3038, 3123, 3039,
                                3124, 3040, 3125, 3041, 3126, 3042, 3127, 3043,
                                3128, 3044, 3129, 3045, 3130, 3046, 3131, 3047,
                                3132, 3048, 3133, 3049, 3134, 3050, 3135, 3051,
                                3136, 3052, 3137, 3053, 3138, 3054, 3139, 3055,
                                3140, 3056, 3141)
                        AND req.pa_rqst_sid = prs.pa_rqst_sid
                        AND prs.oprtnl_flag = 'A'
                        AND prs.pa_rqst_srvc_sid = psd.pa_rqst_srvc_sid
                        AND psd.oprtnl_flag = 'A'
                        AND req.pa_rqst_sid = pci.pa_rqst_sid
                        AND pci.oprtnl_flag = 'A'
                        AND req.pa_rqst_sid = prxm.pa_rqst_sid
                        AND prxm.oprtnl_flag = 'A'
                        AND md.oprtnl_flag = 'A'
                        AND md.status_cid = 2
                        AND TRUNC (SYSDATE) BETWEEN md.from_date AND md.TO_DATE
                        AND prxm.mbr_sid = md.mbr_sid
                        AND ou.org_unit_sid = req.org_unit_sid
                        AND ou.oprtnl_flag = 'A'
                        AND req.pa_rqst_sid = prxpl.pa_rqst_sid
                        AND prxm.pa_rqst_sid = prxpl.pa_rqst_sid
                        AND pci.pa_rqst_sid = prxm.pa_rqst_sid
                        AND pci.pa_rqst_sid = wmdtl.subsystem_task_sid
                        AND pci.pa_rqst_sid = prxpl.pa_rqst_sid
                        AND prxpl.pa_prvdr_type_lkpcd = 'RR'
                        AND prxpl.oprtnl_flag = 'A'
                        AND req.status_cid = sts.status_cid
                        AND sts.status_type_cid = 3
                        AND sts.oprtnl_flag = 'A'
                        AND prxpl.prvdr_lctn_iid = pl.prvdr_lctn_iid
                        AND p.prvdr_sid = pd.prvdr_sid
                        AND p.prvdr_sid = pl.prvdr_sid
                        AND pd.oprtnl_flag = 'A'
                        AND pd.status_cid = 2
                        AND TRUNC (SYSDATE) BETWEEN pd.from_date AND pd.TO_DATE
                        AND wmdtl.subsystem_task_sid = req.pa_rqst_sid
                        AND wmdtl.subsystem_lkpcd = 'PA'
                        AND wmdtl.oprtnl_flag = 'A'
                        AND req.pa_rqst_date > (SYSDATE - 365)
                                       ORDER BY TO_DATE ("Request Date", 'MM/dd/yyyy hh24:mi:ss') DESC,
                            "Beneficiary Name" ASC) a
    WHERE ROWNUM < 102;regards,
    P Prakash
    Edited by: BluShadow on 17-May-2011 15:01
    added {noformat}{noformat} tags around the code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    833560 wrote:
    Can any one give me clue ,how to find out which sub query returns more than one row in the following query .This is why smaller, simpler queries are easier to work with than huge ones - when something like this goes wrong smaller queries are much eaiser to debug. Unfortunately using smaller, easier-to-work with queries is not always an option
    Ganesh is right - you will have to dissect the big query bit by bit until you find the offending subquery. If there is another way I would like to find out about it too.
    The easiest way to do this is probably to use block comments to isolate parts of the query bit by bit until you find the offending part. If you carefully examine the subqueries you might be able to figure out which one is returning multiple rows without commenting everything
    Good luck!

Maybe you are looking for

  • Problems with decoding an latin1-encoded url

    Hi, i have a problem with decoding german umlaut-characters from an URL. I'm using Tomcat 5.5 on a Linux server and one on a windows machine for development. Both webapps have the same configurations. A servlet decodes the URL-String, parses it and s

  • Alert mail for "Pending" column in List SharePoint 2013.

    I'm using SharePoint 2013 online. I've created one List in which one Column is Choice (Completed, Pending) column named "Status". For all Item If "Status" is Pending, weekly one mail should fire with List of only "Pending" Items as a alert to a perso

  • GoldenGate for DB

    Hi experts, we have a replication requirement between oracle to DB2 database,  please help on this, can we use data transformation like mapping and filtering in goldengate between oracle to DB2 databases?  and the actual requirment is, there is 5 tab

  • Keeping my iTunes library in a Airport connect Hardrive

    I want to keep my iTunes library on a hard drive that I have connected to my Airport wireless network. When I do this in the default configuration iTunes cannot access the library until I go out to the shared drive, connect to it, and browse into it

  • Import midi libraries to garage band

    Is it possible to import outsid emidi libraries into garage band?  I want to have individual midi instruments, for instance, a solo cello or solo trumpet, is there a way to achieve this in Garage Band?