I have two main table and details

Hi all

I have the detail and mastery of two tables
desc invoice_master
 ID                                        NOT NULL VARCHAR2(20)
 SALE_ORDER_NO                                      VARCHAR2(50)
 SEASON                                             VARCHAR2(30)
 CUSTOMER_NAME                                      VARCHAR2(300)
 DISPATCH_DATE                                      DATE
INVOICE_NOTE_DATE

desc invoice_detail
ID                                                 VARCHAR2(20)
PROD_ID                                            VARCHAR2(100)
PROD_NAME                                          VARCHAR2(300)
PRODUCT_COLOR                                      VARCHAR2(100)
 XS2                                                NUMBER
 S2                                                 NUMBER
 M2                                                 NUMBER
 L2                                                 NUMBER
 XL2                                                NUMBER
 PCS2                                               NUMBER
 TOTAL2                                             NUMBER
 UNIT_PRICE1                                        NUMBER
 UNIT_PRICE2                                        NUMBER
 TOTAL_PRICE1                                       NUMBER
 TOTAL_PRICE2                                       NUMBER
I insert the data in a master-details three times on three different dates with the same sale_order_no
I want a request to give me max data (invoice_note_date)

Please guide
Thanks vikas singhal

Published by: vikas singhal on June 14, 2010 12:00

You want to select data comes from the main table or the main table and details?
If only the main table, use

SELECT *
FROM   invoice_master
WHERE  invoice_master IN (SELECT MAX(INVOICE_NOTE_DATE)
                          FROM   invoice_master);

SELECT *
FROM   invoice_master
WHERE INVOICE_NOTE_DATE IN (SELECT MAX(INVOICE_NOTE_DATE)
                          FROM   invoice_master);

* 009 *.

Published by: 009 on June 13, 2010 23:35

Tags: Database

Similar Questions

  • How can I get the six digit code for my iPad Pro? I have two other iPads and an iPod but I enter the codes I get and the Pro is just off!

    How can I get the six digit code for my iPad Pro? I have two other iPads and an iPod but I get the codes I get and the Pro is just disabled for longer and longer whenever he rejects these codes!

    If you have forgotten the password for your iPhone, iPad or iPod touch, or your device is disabled - Apple supports

  • Me seems to have two accounts icloud and my ipod won't connect

    I seem to have two accounts icloud and my ipod allow me to connect

    Hey there Chrsey,

    Welcome to Apple Support communities.

    As I understand it, there is a problem checking accounts iCloud on your iPod touch. The article below provides general troubleshooting tips that should help you solve the problems with the Apple ID you use with iCloud on your iOS device.

    iCloud: Troubleshooting - Apple Support account

    In addition, you can consider using a single identifier Apple as suggested here:

    If you have forgotten your Apple - Apple Support ID

    Remember, you only need an Apple ID. With the help of several Apple ID could be misleading when you access content purchased or the use of the services of Apple.

    See you soon.

  • I have two libraries 'photos' and only want one. How Merge/consolidate their?

    I have two libraries 'photos' and only want one. How Merge/consolidate their?

    Photos has no tool to merge two libraries by importing each other.

    • You can export the photos of the smallest library and import them into the largest library,
    • or merge libraries in iCloud, if you sign up for enough storage iCloud accommodate the merged libraries.  To merge in iCloud activate one of your photo libraries as the photo library iCloud and wait for the pictures to download on iCloud, then proceed to the second library, enable this as the iCloud photo library, wait for the pictures to download. iCloud will download the pictures of the first library to the second, and you'll have a library merged in the second library.

    Or buy PowerPhotos.  This tool allows you to move photos between libraries and can help you merge some libraries. You can buy it here:

  • I have two Toshiba laptops, and both died after the installation of Windows Vista SP2

    I have two Toshiba laptops, and both died after the installation of the Windows Vista SP2 (home edition).
    Now, it does not... even not start BIOS... Try to boot from the CD, no luck. When WVista SP2 installed and restarted, after a while, he came to the flashing message: 0xC0190036 1183/62494...

    I can't help that if it does not start even. I don't have a CD WVista. Both laptop came pre-installed. In addition, no rescue CD.

    Any help will be appreciated. I really need help.
    Thank you.

    Well, try this:

    1. If the power is off.
    2. Start the laptop and keep press F8
    3. then select restore.

    And? :)

  • MultiTaskFlow liaison: Hi I have a main application and several sub these i added to my resources and using their taskFlows applications in my main application by creating the multitaskFlow binding. My problem is that how can get us currently rendered you

    Hi, I have a main application and many applications these i have added to my resource and using their taskFlows in my main application by creating the multitaskFlow binding. My problem is that how can currently get us renderings taskFlow Id link MultiTaskFlow running through an action created in our main application. Please explain if we can.

    Hello

    Try to remove the af: group in the facet of the toolbar or use this code in your bean.

    UIComponent panelBox is ae.getComponent () .getParent () .getParent ();.

    Kind regards

    Ruben.

  • I have two variables A and B. I mean "if (A or B > 0) event.value = A + B.

    I have two variables A and B. I mean "if (A or B > 0) event.value = A + B.

    You must combine two compare different operations:

    If ((A > 0) |) (B>0)) {

    Event.Value = A + B;

    }

  • Detailed form Master in Apex - creating main records and details at the same time

    I m trying to create a master form / retail.
    The master is a simple standard form and below on the same page there is a tabular presentation containing the details.

    I am facing a problem when you try to save a new record from the master at the same time with new details.
    If I create a new record of the master and at the same time create detail records for this master (on the same page), when I submit that the foreign key of the details field is not filled in. So only one master record gets inserted into the table and record line is not inserted.

    When I have everything first create a master without a detail and edit this master and then add details so everything's allright (since the primary key field is filled out at the time).

    I just need to confirm that whether in the APEX form master detail, can save master and line record at the same time or is it as master must be registered the 1 and then line must be enterd and saved?

    Please let me know, if this functionality can be achieved in the APEX.

    Hello

    There was an error in the process of pl/sql, you referenced f01 (F01. COUNT) in the loop condition and which should have been f03, also you have assigned the wrong field to what should have been P3_DEPARTMENT_ID

    I fixed that. Also, I'm not 100% sure but I think in order to use the table in the column must be of type text or something (and not hidden), but I can't check now because of lack of time.

    A few mistakes during the presentation, but they are still due to constraints on the other fields.

    FOR I IN 1.APEX_APPLICATION. G_F03. COUNTY

    LOOP

    APEX_APPLICATION. G_F03 (I): =: P3_DEPARTMENT_ID;

    END LOOP;

    Concerning

    Bottom

  • Problem with a master tree table and detail table

    Hello

    I have a treetable master showing on a page and a separate detail below the treetable table on the same page.
    To clarify things, the three tables are involved here: a master and detail table to compose the treetable and another table of details for the current line in the treetable.

    Usually things work well if they browse the detail table. However, if I create or delete some lines of the secondary table and press Rollback, some unwanted behaviors happening.
    In fact, the Rollback, the treetable master both the secondary table are redesigned page.

    However, once updated, despite the current line selected in the treetable still appears as the one that precedes by clicking on restore (don't guess the premiera), the secondary table is always the first line of the master treetable.

    Is there a way to make the first line the master treetable selected current or (preferably) to make the secondary table reflect the selected line that is currently visible in the treetable?

    Thank you

    @user10047839
    see How to keep selected after cancellation line. It can help you
    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/OCT2010-OTN-harvest-183714.PDF

    @Erp
    As far as I know, there is no cancellation line level. Restore is done to AM in all versions of Jdeveloper.

  • I have two HP printers and all often, I get a message that there is no printer

    Original title: from time to time, I get a message that there is no installed printer. I have two printers. I have to turn off everthing and restart the computer. Printers appear in the control panel

    Printers are both HP

    C7280

    F4180

    Hi June, Col.

    1. When did you start to question?

    2. you remember to make changes to the computer recently?

    Method 1:

    Try the Fixit printer mentioned in the link below and check out them.

    Solve printer problems

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-printer-problems

    Also try to uninstall the printer and try to install one at a time and check.

    You can uninstall all the printer drivers, programs and features as well as Device Manager.

    Method 2:

    Step 1:

    Uninstall the drivers from programs and features.

    a. Click Start.

    b. type appwiz.cpl in search, and then press ENTER.

    c. find the printer driver packages, right click and uninstall both packages.

    Step 2:

    Then uninstall the printer since also Device Manager drivers.

    a. click on start

    b. type devmgmt.msc in search

    NOTE: Click on view the hidden devices on the view menu in device managers before you can see devices that are not connected to the computer.

    c. you find devices to printers, right-click on it and select the option uninstall

    After the uninstall, try to install one printer and check if it works. If it works, then try it with the other and check.

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • have two different computers and have problems recoving from hybernation. Locking the system

    Original title: recovery of hybernation

    I have two different computers MS 7 and have all two issues recoving from hybernation. They lock just straight up (do not accept an entry mouse or keyboard) and requir3e hard re boot. Goes 8 to 10 times a week.

    Hello

    (1) did you of recent changes to the computer before the show?

    (2) is the specific question at the opening of specific applications or programs?

    (3) you get an error message?

    You can perform the following methods and check if it helps.

    Method 1: Windows 7 hangs or freezes

    http://support.Microsoft.com/kb/2681286

    2 the resolution of the problems of method Performance

    Run the troubleshooter of performance, then check if it helps.

    Check out the link: http://windows.microsoft.com/en-US/windows7/Open-the-Performance-troubleshooter

    Method3:How to troubleshoot performance problems with sleep, hibernation and resume:

    http://support.Microsoft.com/kb/950686

    Note: The article remains valid for Windows 7 also if it is for Vista.

    For more information, connect to:

    http://Windows.Microsoft.com/en-us/Windows7/sleep-and-hibernation-frequently-asked-questions

    Method 4: update video drivers card

    Check if the video card drivers are up to date. Install the latest video card drivers for Windows 7 on the manufacturer's Web site.

    Tips for solving common driver problems:

     http://Windows.Microsoft.com/en-us/Windows7/tips-for-fixing-common-driver-problems

    It will be useful.

  • I have two installed products and neither works, they start and closing.

    I have both Adobe Creative Cloud editing programs and the other is the Adobe Photoshop elements 14 (Mac, English) both do the same thing.  Normal installation, open the program starts ok, but then they stopped.  I ran the operating system using the safe and got an error message when I started a program, I do not remember the exact wording, but he said that there is a problem with the graphics compatibility.  I use a Mac Mini, again, to the screens that I have two cable RGB screen converted to Thunderbolt ports.  I think that's the problem, but it's the only program that has this problem, all other programs including the work of publishers graphics ok.


    [Removed personal email: email signatures and privacy -mod]

    1st, read http://helpx.adobe.com/premiere-pro/kb/error---preludevideo-play-modules.html

    2nd, double video problems - you have two graphics cards?

    -The Mac https://forums.adobe.com/thread/1622987 troubleshooting steps

    -Mac utility for adapters double http://forums.adobe.com/thread/1017891?tstart=0

  • I have two main e-mail accounts and mail is "forwarding" emails sent to one account to the other older account, they arrive a few hours later. Not sure why it's duplicate my emails at all. How can I stop this?

    Kind of hard to explain in the title... who probably is meaningless.

    Basically, I used to use a BTinternet email for any account. But over the years, I went to my iCloud email account. I have both implemented in mail because I still have the BTinternet account that is linked to many things, despite always use iCloud for the new things now.

    However, when I get a message that was sent to my new iCloud account originally, it appear a new message in my BTinternet a few hours later. And it's quite annoying! Makes me think I have a new email, but this is the one I read Twitter.com.

    It's as if there's some rule set up causing Mail to transmit all messages sent to my email from iCloud, to my BTinternet email. I have no idea why this is happening. There is no actual 'rules' put in place for this in my Mail preferences. Don't know what it could be.

    Any ideas?

    Check iCloud.com/Mail, click on the gear at the bottom left, select Preferences, then accounts. The iCloud account is set up to transfer emails?

  • Is it OK to have two Express EM and EM12c?

    Thank you for taking my questions!

    I start our database upgrade from 11.2 to 12.1.  We currently use EM12c to monitor our databases, but wanted to know if it was possible to install also MS Express?

    Are there problems with the help of the two?  EM12c is slow and cumbersome and the express EM looks like an easy/fast way to monitor the current performance of db.

    Thank you!

    Kathie

    Hi koko,.

    You can use cloud of 12 c and EM Express at the same time controls

    Oracle Enterprise Manager Database Express (Express EM) is a product of web management that is integrated with the Oracle database. It doesn't require installation or special management.

    EM Express is built inside the database server, and there are limits on what he can do.  EM Express also focuses on providing management and performance monitoring features and isn't supposed to be a whole autour database administration tool.

    Where is Database Control (dbconsole) in the 12.1.0.1 (12 c) database? (Doc ID 1568985.1)

    EM Express 12 c Page of Directors of database FAQ (Doc ID 1601454.1)

    12 c slow I recommend opening a SR with oracle support to solve the problem as console 12 c is known to have good performance regarding

    Kind regards
    Rahul

  • I have two Phothshop CC and Photoshop CC 2014 - I need both?

    I did an update on Photoshop CC at the same time, I installed CC 2014.

    My main reason for hesitation is that I see that Photoshop CC picks up 3.39 GB and CC 2014 takes 1.97 GB.

    So of course, I wonder: what I lose?

    OK my PC running WIndows 7 64 bit.  The version of Photoshop CC I have is also 64-bit.  I have 8 GB of RAM.

    I'm a professional photographer and honestly everything I do with Photoshop's edits for my clients and I want to tweak any work of art.

    I created several actions to save time (tattoo, cropping, etc.) all seem to have transferred over.  I shoot raw only so change everything in Camera Raw before securing skin imperfections, dust or something else.

    Of course, any chance of free space on my C drive is a good thing.

    Still, what ANYONE loses from Adobe Photoshop CC for Adobe Photoshop CC 2014?

Maybe you are looking for

  • How can I synchronize bookmarks with my pc?

    I want bookmarks from my pc on my phone.

  • iDVD on the part of an external DVD burner

    The optical drive on my mac mini 2009 died. I need to burn a project to a DVD. I have attached an external DVD burner for mac. I play DVD. How to record from iDVD please?

  • reverse the engine problem!

    Hello! ... I have developed a program that has the algorith as follows: 1 x steps and Y steps determne table of pixel size I want. 2. for each Y increment the X scan by a fixed number of steps, then there 3 step 2 is repeated until there is reached i

  • Available music on a SD card

    Hi, I would like to send the owner a c240 (v2) of homemade (-online unprotected) Music mp3 and wma on a micro SD card. I have a USB card reader/writer and that you can copy the files to the card, but I don't know what kind of layout of the record or

  • Update KB976932-cannot install error code 800 b 0100

    original title: update KB976932 KB976932 update does not update.  I tried 3 times and disabled UAC and I get error code 800b0100