Results 1 to 3 of 3
  1. #1
    Join Date
    May 2014
    Posts
    2

    Unanswered: Problem with subquery on php/oracle10

    Hi

    I need the selection from totalquantity in daten.
    The problem is, that only postingno is incr.
    I tested do use the max() - Function but i need the totalquantity and the itemno!
    I can`t use the filter (ROWNUM = 1) because

    "No, Oracle doesn't correlate the subqueries nested more than one level deep."

    daten
    |auftragno
    |itemno
    |bezeichung

    journal
    |postingno
    |itemno
    |totalquantity
    |änderungsdatum

    Can you help me?

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    consider to read & follow the content of URL below

    http://www.dbforums.com/oracle/10316...s-posters.html
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    May 2014
    Posts
    2
    Code:
    $query = "SELECT	daten.*,
    			   (SELECT * 
    				FROM
    				   (SELECT PostingNo, ItemNo, TotalQuantity
                		FROM   Journal
                		WHERE  ItemNo = daten.MNr
    	          		ORDER BY PostingNo DESC) 
    				WHERE ROWNUM = 1) AS TotalQuantity	
    		  FROM 	daten
    		  WHERE     usedby = 'KUNDENAUFTRAG''";
    I need this SELECT without subqueries nested more than one level deep.

    AngstHab

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •