How to reduce the size of the query

Hi all,
Can any one suggest me how to reduce the size of the following query .
/* Formatted on 2011/07/12 11:02 (Formatter Plus v4.8.8) */
SELECT prs.pa_rqst_srvc_sid,
(SELECT prpre.erroneous_data_value
FROM pa_error pe,
pa_error_detail ped,
pa_request_procedure_run_error prpre
WHERE pe.pa_error_sid = ped.pa_error_sid
AND ped.pa_error_sid = prpre.pa_error_sid
AND ped.oprtnl_flag = 'A'
AND prpre.oprtnl_flag = 'A'
AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
AND pe.pa_error_nmbr = '5031'
AND ped.aaa_segment_loop_nmbr = '2000F') revenue_iid,
(SELECT prpre.erroneous_data_value
FROM pa_error pe,
pa_error_detail ped,
pa_request_procedure_run_error prpre
WHERE pe.pa_error_sid = ped.pa_error_sid
AND ped.pa_error_sid = prpre.pa_error_sid
AND ped.oprtnl_flag = 'A'
AND prpre.oprtnl_flag = 'A'
AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
AND pe.pa_error_nmbr = '5013'
AND ped.aaa_segment_loop_nmbr = '2000F') x12_code_list_qlfr_lkpcd,
(SELECT prpre.erroneous_data_value
FROM pa_error pe,
pa_error_detail ped,
pa_request_procedure_run_error prpre
WHERE pe.pa_error_sid = ped.pa_error_sid
AND ped.pa_error_sid = prpre.pa_error_sid
AND ped.oprtnl_flag = 'A'
AND prpre.oprtnl_flag = 'A'
AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
AND pe.pa_error_nmbr = '5026'
AND ped.aaa_segment_loop_nmbr = '2000F') procedure_iid,
(SELECT prpre.erroneous_data_value
FROM pa_error pe,
pa_error_detail ped,
pa_request_procedure_run_error prpre
WHERE pe.pa_error_sid = ped.pa_error_sid
AND ped.pa_error_sid = prpre.pa_error_sid
AND ped.oprtnl_flag = 'A'
AND prpre.oprtnl_flag = 'A'
AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
AND pe.pa_error_nmbr = '5027'
AND ped.aaa_segment_loop_nmbr = '2000F') mdfr_code,
(SELECT prpre.erroneous_data_value
FROM pa_error pe,
pa_error_detail ped,
pa_request_procedure_run_error prpre
WHERE pe.pa_error_sid = ped.pa_error_sid
AND ped.pa_error_sid = prpre.pa_error_sid
AND ped.oprtnl_flag = 'A'
AND prpre.oprtnl_flag = 'A'
AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
AND pe.pa_error_nmbr = '5028'
AND ped.aaa_segment_loop_nmbr = '2000F') mdfr2_code,
(SELECT prpre.erroneous_data_value
FROM pa_error pe,
pa_error_detail ped,
pa_request_procedure_run_error prpre
WHERE pe.pa_error_sid = ped.pa_error_sid
AND ped.pa_error_sid = prpre.pa_error_sid
AND ped.oprtnl_flag = 'A'
AND prpre.oprtnl_flag = 'A'
AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
AND pe.pa_error_nmbr = '5029'
AND ped.aaa_segment_loop_nmbr = '2000F') mdfr3_code,
(SELECT prpre.erroneous_data_value
FROM pa_error pe,
pa_error_detail ped,
pa_request_procedure_run_error prpre
WHERE pe.pa_error_sid = ped.pa_error_sid
AND ped.pa_error_sid = prpre.pa_error_sid
AND ped.oprtnl_flag = 'A'
AND prpre.oprtnl_flag = 'A'
AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
AND pe.pa_error_nmbr = '5030'
AND ped.aaa_segment_loop_nmbr = '2000F') mdfr4_code,
(SELECT prpre.erroneous_data_value
FROM pa_error pe,
pa_error_detail ped,
pa_request_procedure_run_error prpre
WHERE pe.pa_error_sid = ped.pa_error_sid
AND ped.pa_error_sid = prpre.pa_error_sid
AND ped.oprtnl_flag = 'A'
AND prpre.oprtnl_flag = 'A'
AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
AND pe.pa_error_nmbr = '5014'
AND ped.aaa_segment_loop_nmbr = '2000F') rqst_prcdr_amt,
(SELECT prpre.erroneous_data_value
FROM pa_error pe,
pa_error_detail ped,
pa_request_procedure_run_error prpre
WHERE pe.pa_error_sid = ped.pa_error_sid
AND ped.pa_error_sid = prpre.pa_error_sid
AND ped.oprtnl_flag = 'A'
AND prpre.oprtnl_flag = 'A'
AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
AND pe.pa_error_nmbr = '5015'
AND ped.aaa_segment_loop_nmbr = '2000F') srvc_line_rate,
'NA' drug_desc, 'NA' product_service_id, 'NA' uom_code,
'NA' rqst_prcdr_units
FROM pa_transaction_request ptr,
input_acknwldgmnt ia,
input_batch_file ibf,
pa_request pr,
pa_request_service prs,
pa_request_procedure prp
WHERE ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
AND ia.input_batch_file_sid = ibf.input_batch_file_sid
AND ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
AND pr.pa_rqst_sid = prs.pa_rqst_sid
AND prs.pa_rqst_srvc_sid = prp.pa_rqst_srvc_sid
AND pr.oprtnl_flag = 'A'
AND prs.oprtnl_flag = 'A'
AND ptr.oprtnl_flag = 'A'
AND prp.oprtnl_flag = 'A'
AND prs.rqst_ctgry_lkpcd = 'AR'
AND ibf.original_file_name = 'HIPAA.165760000.20110613I001.278_IRej.dat';
Thanks,
P Prakash

Hi,
Maybe like that, but keep in mind that it is highly untested_ :SELECT
  prs.pa_rqst_srvc_sid,
  pvt.c5031 revenue_iid,
  pvt.c5013 x12_code_list_qlfr_lkpcd,
  pvt.c5026 procedure_iid,
  pvt.c5027 mdfr_code,
  pvt.c5028 mdfr2_code,
  pvt.c5029 mdfr3_code,
  pvt.c5030 mdfr4_code,
  pvt.c5014 rqst_prcdr_amt,
  pvt.c5015 srvc_line_rate,
  srvc_line_rate,
  'NA' drug_desc,
  'NA' product_service_id,
  'NA' uom_code,
  'NA' rqst_prcdr_units
FROM
  pa_transaction_request ptr,
  input_acknwldgmnt ia,
  input_batch_file ibf,
  pa_request pr,
  pa_request_service prs,
  pa_request_procedure prp,
    SELECT
      prpre.pa_rqst_prcdr_sid,
      MAX(DECODE(pa_error_nmbr,'5013',prpre.erroneous_data_value,NULL)) c5013,
      MAX(DECODE(pa_error_nmbr,'5014',prpre.erroneous_data_value,NULL)) c5014,
      MAX(DECODE(pa_error_nmbr,'5015',prpre.erroneous_data_value,NULL)) c5015,
      MAX(DECODE(pa_error_nmbr,'5026',prpre.erroneous_data_value,NULL)) c5026,
      MAX(DECODE(pa_error_nmbr,'5027',prpre.erroneous_data_value,NULL)) c5027,
      MAX(DECODE(pa_error_nmbr,'5028',prpre.erroneous_data_value,NULL)) c5028,
      MAX(DECODE(pa_error_nmbr,'5029',prpre.erroneous_data_value,NULL)) c5029,
      MAX(DECODE(pa_error_nmbr,'5030',prpre.erroneous_data_value,NULL)) c5030,
      MAX(DECODE(pa_error_nmbr,'5031',prpre.erroneous_data_value,NULL)) c5031
    FROM
      pa_error pe,
      pa_error_detail ped,
      pa_request_procedure_run_error prpre
    WHERE
      pe.pa_error_sid     = ped.pa_error_sid
    AND ped.pa_error_sid  = prpre.pa_error_sid
    AND ped.oprtnl_flag   = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND pe.pa_error_nmbr IN ('5013','5014','5015','5026','5027','5028','5029',
      '5030','5031')
    AND ped.aaa_segment_loop_nmbr = '2000F'
    GROUP BY
      prpre.pa_rqst_prcdr_sid
  pvt
WHERE
  pvt.pa_rqst_prcdr_sid       = prp.pa_rqst_prcdr_sid
AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
AND ia.input_batch_file_sid   = ibf.input_batch_file_sid
AND ptr.pa_trnsctn_rqst_sid   = pr.pa_trnsctn_rqst_sid
AND pr.pa_rqst_sid            = prs.pa_rqst_sid
AND prs.pa_rqst_srvc_sid      = prp.pa_rqst_srvc_sid
AND pr.oprtnl_flag            = 'A'
AND prs.oprtnl_flag           = 'A'
AND ptr.oprtnl_flag           = 'A'
AND prp.oprtnl_flag           = 'A'
AND prs.rqst_ctgry_lkpcd      = 'AR'
AND ibf.original_file_name    = 'HIPAA.165760000.20110613I001.278_IRej.dat';Edited by: Nicosa on Jul 12, 2011 2:20 PM
Corrected columns aliases in outer query :
- c5031 instead of 5031
- c5013 instead of 5013

Similar Messages

  • How to reduce view size in the info page after clicking the apps?

    The apps icon was missing from category and top chart for a few days. The icon came back after turning off and on the iPad 2. However the font size and images in the info page was corrupted. It is much larger than before and I could not reduce them.
    Please help where can I change the settings to reinstate the original font size.
    Thank you very much.

    Hi,
    Did you try to set java min and max to different sizes?
    Then you still need a full GC to reduce the heap
    because only the full GC compacts memory.
    For IBM JRE you will need this to compact anyway.
    In general applications perform better with heapmin=max.
    -Xmx<size> set maximum Java heap size. example: -Xmx64m
    -Xmn<size> set new generation Java heap size. example: -Xmn64m
    Different size make it compacter but are more expensive(time)
    Do you run Full GC as system.gc()?
    I would never do this.
    Let the JRE take care of this.
    Number 1 GC rule is avoid it.

  • How can I reduce the size of the page? The txt is too big.  Where is the scale of percentage?

    Can anyone tell me how to reduce the size of the page like before when I just clicked on it and I could make the page large or small by %.  The DC is different then what I had before.  Thanks  Jim

    Hi jsamx,
    You can hold down ctrl key on your keyboard and then use your mouse scroll to zoom-in or or zoom-out of the page.
    Alternatively, you can go to view menu -> zoom -> Dynamic zoom.
    Does this helps with your query?
    Regards,
    Rahul

  • I am shooting with a Nikon D60 on Fine Format and unable to print larger than 11x14.  I have been able to print larger pictures.  I am told iPhoto reduces the size of the file when uploaded. Is this true? If so how can I change this?  I need 16x20's

    I am shooting with a Nikon D60 on Fine Format and unable to print larger than 11x14.  I have been able to print larger pictures.  I am told iPhoto reduces the size of the file when uploaded. Is this true? If so how can I change this?  I need 16x20's

    I am shooting with a Nikon D60 on Fine Format and unable to print larger than 11x14.  I have been able to print larger pictures.  I am told iPhoto reduces the size of the file when uploaded. Is this true? If so how can I change this?  I need 16x20's

  • I have an imac 27 inch O SX 10.6.8. using iphoto 11 Version 9.1.5. I have scanned some photos at very high resolution with each photo being about 45MB. They're saved to desktop. How can I reduce the size of the scanned photo's they are crashing iphoto

    I have an imac 27 inch O SX 10.6.8. using iphoto 11 Version 9.1.5. I have scanned some photos at very high resolution with each photo being about 45MB. They're saved to desktop. How can I reduce the size of the scanned photo's they are crashing iphoto.

    What format are they? Tiif? Jpeg? You can compress them with a lot of apps - including Preivew and just about any graphics editor out there. I'm not sure that 45mb would crash iPhoto thogh, are yo sure that's the cause? I know that some folks have mentioned pixel dimensions causing issues, as can color profiles.
    Regards
    TD

  • How do i reduce the size of the pdf's scanned from my printer

    i scan from my printer to a pdf.  the file comes across way to big (2mb for 4 pages with no pictures & just text, etc.)  i have already re-set the settings on my scanner / printer to try to get the smallest dpi & image possible.  how do i get to the settings on my adobe acrobat to reduce the size of the pdf when saved on my computer or is this not the right place to do that?

    m spires wrote:
    i have already re-set the settings on my scanner / printer to try to get the smallest dpi & image possible.
    You may need to reset that to use higher scan quality for successful OCR.

  • How do you reduce the size of the print diolog box when printing a pdf file?

    How do you reduce the size of the print diolog box when trying to print a PDF file? The print button is below the task bar.

    What is your monitor's screen resolution?  See http://www.adobe.com/products/reader/tech-specs.html

  • How can I reduce the size of the jvm?

    I would like to decrease the size of a jvm; I've found a program that makes it, but you don't know how does it works (and you have to pay for it), I'm talking about VM Optimizer 2.0, from Invirtus.
    Can anyone tell me how can I reduce the size of the jvm?
    Thanks a lot.

    I assume you mean the size of a JVM instance in memory and not the size of the JRE which is on the disk.
    I don't believe that there is any way at present for your Java code to change the amount of memory available to the JVM. This shouldn't matter too much, though. Firstly, you can control the size of the JVM from the command prompt with the -Xms and -Xmx options. Secondly, any remotely reasonable operating system is going to wait until the JVM has requested memory before allocating all of it. If you start a JVM with a 2Gb heap, it does not occupy 2Gb of physical memory straight away.
    Finally, I did a Google on InVirtus VM Optimizer and must request some information. What does that software have to do with Java? It's designed to reduce the size of a virtual computer as created by a prorgam such as VMWare. It has nothing to do with the Java virtual machine.

  • How do you reduce the size of the email storage on an iPhone?  I have deleted all mail items and my mailbox still takes up 1.2 GB of space.

    how do you reduce the size of the email storage on an iPhone?  I have deleted all mail items and my mailbox still takes up 1.2 GB of space.

    What is the Other on my iPhone and How to Remove It
    Also
    "First you go settings/general/usage/music/then left swipe over music and press delete and you would think it deletes your music but it doesn't instead it deletes your other but make sure your ipod is connected to a computer while doing this"
    as recommended by:
    How do I get rid of "other" storage: Apple Support Communities
    Next, usually restoring from backup eliminated the corrupted files. However, sometimes restoring to factory settings/new iPod is required.
    To restore from backup see:
    iOS: How to back up
    To restore to factory settings/new iPod see:
    iTunes: Restoring iOS software

  • How to reduce the size of the confirmation pop up window?

    Hello All.
    In my application I have used confirmation pop up, for updating the users about the actions they have performed.
    But the size of the pop up window is too big.
    I want to reduce the size of the pop up window.
    How can I achieve this?
    Regards,
    SampathKumar.

    >
    Thomas Jung wrote:
    > The popup automatically resizes to its inner content. If you are reusing one of the standard SAP-Provided confirmation popups, then you really can't control the size.
    Hi Thomas!
    Yes, it is true, but in our HR system after an SP upgrade it dosn't works.
    Look at my thread, you can see an image 'BEFORE and AFTER' !
    [Popup size error in Webdynpro for ABAP|Popup size error in Webdynpro for ABAP]
    Thanks.

  • How to reduce the size of the pdf scanned file ?

    Hi, 
    I have canon PIXMA MG2120. I am trying to scan the documents but the size is to big to attach to email. Any Idea how to reduce the size of the PDF file?

    Hello
     For pdf size,you can compress the pdf size if you want to reduce the size of the pdf files.
    Here is the code to do it:
    using System.IO;
    using System.Drawing.Printing;
    using RasterEdge.Imaging;
    using RasterEdge.Imaging.Codec.Compression;
    using RasterEdge.Imaging.PDF;
    DocumentCompression.infile(@"C:\1.pdf");
    DocumentCompression.Outfile(@"C:\2.pdf");
    DocumentEncoder = DocumentEncoder.Group3Encoding
    RasterEdgeImaging Document = new RasterEdgeDocumentg();
    Image. DocumentCompression(@"C:\1.pdf", "C:\2.pdf", DocumentEncoder DocumentEncoder.Group3Encoding);

  • How to reduce the size of the paper for form in sapscripts?

    Hi All,
    How to reduce the size of the paper for form in sapscripts?
    Thank you.
    Regards,
    Alice

    Goto SE71, enter your form name and press F6.
    Now goto Basic Settings (Button Top right in the Dynpro, not in the button bar tho).
    Now change page format and orientation to desired one.

  • How to reduce the size of the pdf file?

    How to reduce the size of the pdf file?
    Thank you for the help,
    Best
    Jamal

    You have two options:http://www.screencast.com/t/p3srGDGP
    In this screen shot I have two method chosen.
    the one highlighted in yellow is more effective, except in the case where the pdf was from a Scan which is graphics only.
    select the one in yellow first and click on Fonts. Remove all duplicates. for some reason, I don't know if its defect in Acrobat, but usually multiple copies of the exact Font will show up and some cases there will font families not even used in your document.  remove all duplicates.
    Note: Duplicates do not mean for example: Helvetica, Helevetica Bold, Helvetica Bold Italic (these are three different fonts).
    You can reduce the quality of the graphics used and so on while in menu.
    The feature highlighted in green  more or less just reduce the general qaulity of the PDF. and may work for some PDF's

  • How to reduce the size of the search portlet

    How to reduce the size of the search portlet inserted into a
    page?
    Thanks,
    Mara

    Mara,
    you can reduce the size of the portlet customizing the HTML
    code... i had the same problem and i reproduced the search
    portlet with a dynamic page, customizing my HTML and using the
    categ. & perspective IDs of the original portlet. It works but
    is not an elegant way to do this... i'm searching a better way
    to do it. If you'll find, please let me know....
    Fab

  • IPhone 5 (16GB) iOS 7.0.4 Mail App size is 1GB and continuously increasing. How to reduce the size of the Mail App?

    Hi,
    I am using an iPhone 5 (16GB) iOS 7.0.4.
    Currently the size of the mail app is 1GB and is continously increasing, even though the advanced settings in the mail account have been set as following:
    MOVE DISCARDED MESSAGES INTO:
    Deleted Mailbox
    DELETED MESSAGES:
    Remove: After one day
    INCOMING SETTINGS:
    Delete from Server: When removed from Inbox
    The problem that I am facing is that only a few emails reside on my iPhone as I keep deleting emails, which are also deleted from the server automatically because of the settings as above, which is perfectly fine. The emails are deleted from the Mail app and only a very few of them are visible which I have not deleted as yet, and all is fine till here. The problem is that the size of the Mail app is more than 1GB and is continously increasing, when i check the size of the Mail app in the Settings > General > Usage section.
    When I search for an email that has previously been deleted from the search feature by swiping down in the main page, it still comes up in the search, and upon clicking the searched email, it takes me into the Mail app, however, the mail is not there. I have tried searching for emails which were deleted weeks ago, and they still come up in the search feature, however, they DO NOT open in the Mail app when i click them within the search feature in the main page.
    Up until a couple of months ago, the size of the Mail app was about 5.2GB and at this point I had no space on my 16GB iPhone 5, therefore I resetted my phone two months ago, and after a complete reset of the iPhone 5, the size of the Mail app went back to 0.3KB (like it was brand new out-of the box); however, within a matter of two months the size of the Mail app has now exceeded 1GB and is continously increasing, as I receive alot of emails which is why I delete them on daily basis and even delete them from the Trash folder (mailbox).
    I have read alot of blogs and even checked with other friends using similar settings on the same model, however, I just cant seem to figure this out. I would really appreciate if someone can help me with this issue as I dont want to have to reset it again after another 2-3 months.
    There are practically only 14-15 emails on my Mail app with not alot of KBs for these emails, and the trash folder is also empty, but the size of the Mail app is still not reducing. Please help!!
    Regards,
    Shoaib Malik

    Have you tried restarting or resetting your iPhone?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after It shuts down, press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds).
    Also consider deleting and reinstalling the Mail Account in question.

Maybe you are looking for

  • Cool trick for 10.4.8 users you may not know about....

    if you have a mighty mouse or a scroll wheel, hold down control and twizzle it. cool eh? now move the mouse around. very cool. you can turn the same setting on to be used with key commands in system preferences -> universal. but i think this new feat

  • CS6 & OSX 10.6.8 - saving files directly to the server does not work (most of the time)

    Hi there, we just switched from OSX 10.5.8 to 10.6.8 OSX was installed on a new partition of the harddisk Then installed CS 5 Then installed CS 6 via (adobe creative cloud) With CS6 we got also the problem with saving files to the server (program err

  • White Rectangle Box on Captured Videos

    Has anyone suffered from the same problem? When I try to record a video clip from a video cassette (VCR) onto my computer, there is a "huge" rectangular white box covering the middle of the video clip on the playback. One of my friends who also has a

  • Charges for calling Skype number from cell phone

    Just purchased a skype phone number. Chose a local area code so family can call me while Iam in Italy. Will there be an additional charge on their cell phone when they call me. They have unlimited calls and text on there monthly cell plan. Will I hav

  • A program required for installation could not be run

    I am trying to update itunes, but it rolls back and doesn't complete. This is getting frustrating as to I need it to update my ipod. Please help me!!