sql - ORA-00904 "Invalid identifier” for an identifier in a group by clause -


I am trying to show ro with compiere database

between two dates.

Column:

Designation

Sales of a Client Sales (Depot) Clients

Quality-Sale Selling Deliver Sales

- Total

Why is this query

  Designed as SELECT p.name, p.M_PRODUCT_CATEGORY_ID, IL.PRICEACTUAL forms of value In the case of bp.C_BPARTNER_ID idpartner, this is the case when i.IsReturnTrx = 'N' then yoga (il.linenetamt) and yoga (il.linenetamt) * - 1 is the case as the netHT, when i.IsReturnTrx = 'N' then yoga (il.linenetamt + (il.linenetamt * t.rate / 100)) and yoga (il.linenetamt + (il.linenetamt * t.rate / 100)) * - 1 end netTTC In the form of , Qtydepot as (from il.qtyinvoiced selection C_InvoiceLine il ou bp.ISCUSTOMER = 'y' and bp.ISACTIVE = 'y' and bp.C_BPARTNER_ID = 19999), (qtyinvoiced from C_InvoiceLine il ou bp.ISCUSTOMER = 'y' Selection and bp.C_BPARTNER_ID = 18,888) qtyliv, org.description ORGNAME, loc2.address1, loc2.address2, loc2.address3, loc2.address4, loc2.city, loc2.postal, oi.phone, oi.phone2 In the form, Oi. Fax, i.DATEINVOICED from C_InvoiceLine il INNER JOIN M_PRODUCT p ON (p.M_PRODUCT_ID = IL.M_PRODUCT_ID) INNER JOIN at C_INVOICE I. (i.C_INVOICE_ID = IL.C_INVOICE_ID) INNER JOIN C_BPARTNER BP ON (BP C_BPARTNER_ID = I C_BPARTNER_ID) INNER JOIN AD_Org org ON (i.AD_Org_ID = org.AD_Org_ID) Join INNER Join the C_Tax T (T.T.T.M.T.I.L. CTMX_ID) INNER ad_orginfo oi ON (org. Ad_org_id = oi.ad_org_id) Join INNER c_location loc2 ON (oi.c_location_id = loc2.c_location_id) ('Co.', 'CL') - and i.IsSoTrx $ P {DATE1} and $ P {DATE2} - Between- and --i.DocStatus --WHERE i.DateInvoiced = 'Y' - and p.name, p.M_PRODUCT_CATEGORY_ID, il.QTYINVOICED, il.PRICEACTUAL, i.DAT by p.isstocked = EINVOICED, bp.C_BPARTNER_ID, org.description, loc2.address1, loc2 'Y' Group Address II, loc2.address3, loc2.address4, loc2.city, loc2.postal, oi.phone, oi.phone2, oi.fax, i.IsReturnTrx, i.dateinvoiced, qtyliv, p.name order qtydepot, i. Dateinvoiced;  

Give me this error:

  ORA-00904: "QTYLIV": identifier non violet 00 9 04. 00000 - "% s: invalid identifier" * Cause: * Action: Error LaLanne 75, Colon 3  

Not your reference For a column nickname in the same level of SQL, except for order section

:

You can use a column Surname, c_alias , to immediately label the preceding expression in the selection list so that the call To be displayed with a new title. The selection list item effectively renames the list for the duration of the alias query. Alias ​​can be used in the ORDER BY section, but none in the query .

When you evaluate the selection list of GROUP BY in QTYLIV , the evaluation has not been evaluated yet and the surname is not present. It only parses and executes the query.

When you have a complex expression in the selection list, it is often easy to wrap in the outer selection and then grouping:

 choose  (Design as p.name, p.M_PRODUCT_CATEGORY_ID, as the IL.PRICEACTUAL pricing, as bp.C_BPARTNER_ID idpartner, select the case ... (C_InvoiceLine il ou bp.ISCUSTOMER = 'Y' and BP Qtyinvoiced selection as qtyliv, as qtyliv, ... i.DATEINVOICED C_InvoiceLine il join DAT from M_PRODUCT P ... at (oi.c_location_id = loc2.c_location_id) --WHERE i.Da Name, M_PRODUCT_CATEGORY_ID, in the QTYINVOICED group, between teInvoiced $ P {DATE1} and $ P ('Co.', 'CL') - and i.IsSoTrx = 'Y' - and p.isstocked = 'Y') DATE2} - and --i.DocStatus, good luck, ... qtyliv, qtydepot command, name, date of departure;  

Note that you do not use the original table aliens in the external selection in GROUP BY or ORDER BY Are not in


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -