Order By Alphanumierc with a union

hi,
Question i have a bunch of course numbers i am querying out i.e. (01, 01A, 9, 9A, 101, 101B) and so forth,
How its ordering them now is
01
01A
101
101B
9
9A
What i need is
01
01A
9
9A
101
101B
I have found many answers that work on a single query, but none of them work on a UNION ALL
This is the error i get
ORA-01785: ORDER BY item must be the number of a SELECT-list expression
Any Ideas on what i can do
I have used to_number, REGEXP_REPLACE, lpad and i have yet to get it to work. Any help would be great.

I'm not sure what you are really after. It's always best to:
1. Oracle version (SELECT * FROM V$VERSION)
2. Sample data in the form of CREATE / INSERT statements.
3. Expected output
4. Explanation of expected output (A.K.A. "business logic")
5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.
It doesn't seem like the original information gives us a complete picture of what you are trying to do. Please explain further.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • ORDER BY columns in a UNION

    Hi all, I have a pair of statements connected by a UNION, where I need to sort the final result according to columns not appearing in any column list:
    SELECT REF(d) FROM DOCUMENT_TABLE d
    WHERE d.header$.parentKey = ?
    UNION
    SELECT REF(d) FROM DOCUMENT_TABLE d, CROSS_TABLE k
    WHERE k.doc = d.key$ AND k.folder = ?
    ORDER BY d.header$.name
    this fails saying that d.header$.name is an invalid identifier (ORA-904), like being out of scope.
    Both union branches succeed when run alone (select + order by).
    How can I sort by colums without having them to be returned ?
    In all examples I found columns are also retrieved and referenced by either alias or by position.
    Thanks.

    Hi,
    In a UNION query, you can only ORDER BY columns in the SELECT clause.
    You can do the UNION in a sub-query, then do the ORDER BY in the main query, where you can ORDER BY anything:
    WITH     union_results     AS
         SELECT  REF (d)     AS ref_d
         ,     name     
         FROM      DOCUMENT_TABLE     d
         WHERE      d.header$.parentKey = ?
    UNION
            SELECT  REF (d)     AS ref_d
         ,     name
         FROM      DOCUMENT_TABLE     d
         ,     CROSS_TABLE     k
         WHERE     k.doc       = d.key$
         AND     k.folder  = ?
    SELECT    REF_D
    FROM       union_results
    ORDER BY  name
    ;Your front end may be able to hide specified columns, so you could do this without a sub-query.
    For example, in SQL*Plus you can say:
    COLUMN  name    NOPRINT
         SELECT  REF (d)     AS ref_d
         ,     name     
         FROM      DOCUMENT_TABLE     d
         WHERE      d.header$.parentKey = ?
    UNION
            SELECT  REF (d)     AS ref_d
         ,     name
         FROM      DOCUMENT_TABLE     d
         ,     CROSS_TABLE     k
         WHERE     k.doc       = d.key$
         AND     k.folder  = ?
    ORDER BY  name
    ;The result set actually contains two columns, but SQL*Plus will only display one.

  • Writing order by clause with user parameter

    I have a user parameter where the user is supposed to choose what column they want to sort by.
    And they can choose between k.personnr and k.personnavn. I am trying to do this with a decode function.
    Now this would work fine if there was no union between these select statements.
    But with the union I get a ORA-01785, where they tell me to put in a number.
    Here is the sql:
    SELECT
    k.personnr as PERSON ,
    k.personnavn as NAVN,
    r.belop as SUM,
    concat(to_char(r.bilagdato,'MM'), to_char(r.bilagdato,'YYYY')) AS MND,
    PERIODE(concat(to_char(r.bilagdato,'MM'), to_char(r.bilagdato,'YYYY'))) AS PERIODE
    FROM
    reskontro r,
    klient k,
    kontoplan p,
    konto c
    WHERE
    r.distriktnr='21'
    and r.distriktnr=c.kontoid
    and r.distriktnr=k.distriktnr
    and r.personnr=k.personnr
    and r.kontonr=p.kontonr
    and (((r.bilagdato between :p_fra_dato and :p_til_dato) and (:p_fra_dato <= c.overfort) and (:p_til_dato <= c.overfort))
    or ((r.bilagdato between :p_fra_dato and c.overfort) and (:p_fra_dato <= c.overfort) and (:p_til_dato >= c.overfort)))
    UNION ALL
    SELECT
    k.personnr as PERSON ,
    k.personnavn as NAVN,
    (t.belop/100) as SUM,
    concat(to_char(t.bilagdato,'MM'), to_char(t.bilagdato,'YYYY')) AS MND,
    PERIODE(concat(to_char(t.bilagdato,'MM'), to_char(t.bilagdato,'YYYY')),:P_HORISONTAL) AS PERIODE
    FROM
    transaksjon t,
    klient k,
    kontoplan p
    WHERE
    t.distriktnr='21'
    and t.distriktnr=k.distriktnr
    and t.personnr=k.personnr
    and t.kontonr=p.kontonr
    and t.bilagdato between :p_fra_dato and :p_til_dato
    This is the order by clause I would like to use:
    order by decode(:p_order_by,'Personnavn',k.personnavn,k.personnr)
    I also get an error when I use:
    order by decode(:p_order_by,'Personnavn',2,1)
    Can anybody tell me how to work around this problem?

    Hi,
    One way you can do to get around this problem could be :
    select * from (
    SELECT
    k.personnr as PERSON ,
    k.personnavn as NAVN,
    r.belop as SUM,
    concat(to_char(r.bilagdato,'MM'), to_char(r.bilagdato,'YYYY')) AS MND,
    PERIODE(concat(to_char(r.bilagdato,'MM'), to_char(r.bilagdato,'YYYY'))) AS PERIODE
    FROM
    reskontro r,
    klient k,
    kontoplan p,
    konto c
    WHERE
    r.distriktnr='21'
    and r.distriktnr=c.kontoid
    and r.distriktnr=k.distriktnr
    and r.personnr=k.personnr
    and r.kontonr=p.kontonr
    and (((r.bilagdato between :p_fra_dato and :p_til_dato) and (:p_fra_dato <= c.overfort) and (:p_til_dato <= c.overfort))
    or ((r.bilagdato between :p_fra_dato and c.overfort) and (:p_fra_dato <= c.overfort) and (:p_til_dato >= c.overfort)))
    UNION ALL
    SELECT
    k.personnr as PERSON ,
    k.personnavn as NAVN,
    (t.belop/100) as SUM,
    concat(to_char(t.bilagdato,'MM'), to_char(t.bilagdato,'YYYY')) AS MND,
    PERIODE(concat(to_char(t.bilagdato,'MM'), to_char(t.bilagdato,'YYYY')),:P_HORISONTAL) AS PERIODE
    FROM
    transaksjon t,
    klient k,
    kontoplan p
    WHERE
    t.distriktnr='21'
    and t.distriktnr=k.distriktnr
    and t.personnr=k.personnr
    and t.kontonr=p.kontonr
    and t.bilagdato between :p_fra_dato and :p_til_dato)
    order by decode(:p_order_by,'Personnavn', NAVN, PERSON)
    /Uffe

  • Help with slow union all

    Hi
    The problem Im having is that I had a query on sales order tables that used to take a couple of minutes to run. The user wanted contract orders to be added to the query and these were stored in different tables to the sales orders. I carried out union all joins in views and then applied the query to the views. Unfortunately it now takes 30 minutes to run.
    I apologise for the large post, I am just trying to provide enough information for someone to help me out.
    Any help will be greatly appreciated.
    Thanks
    Stephen
    The original query was:
    SELECT
    C_STD_COST.MAT, C_STD_COST.LAB, C_STD_COST.OHD, ITEM.PC, BILL_HDR.RATE,
    BILL_SO.SO_SHIP_QTY, BILL_SO.SO_SHIP_EXT_AMT, AR_DOC.CUSTOMER,
    BILL_SO.AR_DOC,
    CUS_LOC.NAME, AR_DOC.CREATED_DATE, MEMO.TOT_ORD_QTY, MEMO.UNIT_PRICE,
    MEMO.BOOK_RATE, AR_DOC.AR_DOC_TYPE, MEMO.MEMO_TYPE, BILL_SO.ITEM
    FROM
    AR_DOC, BILL_HDR, CUS_LOC, BILL_SO, ITEM, MEMO, C_STD_COST
    WHERE
    AR_DOC.AR_CCN=BILL_HDR.AR_CCN AND
    AR_DOC.AR_DOC_TYPE=BILL_HDR.AR_DOC_TYPE AND
    AR_DOC.AR_DOC=BILL_HDR.AR_DOC AND
    AR_DOC.CUSTOMER=CUS_LOC.CUSTOMER AND
    AR_DOC.CUS_AR_LOC=CUS_LOC.CUS_LOC AND
    BILL_HDR.AR_CCN=BILL_SO.AR_CCN AND
    BILL_HDR.AR_DOC_TYPE=BILL_SO.AR_DOC_TYPE AND
    BILL_HDR.AR_DOC=BILL_SO.AR_DOC AND
    BILL_SO.ITEM=ITEM.ITEM (+) AND
    BILL_SO.REVISION=ITEM.REVISION (+) AND
    BILL_SO.AR_DOC=MEMO.AR_DOC (+) AND
    BILL_SO.AR_DOC_LINE=MEMO.MEMO_LINE (+) AND
    BILL_SO.AR_CCN=MEMO.SALES_CCN (+) AND
    BILL_SO.AR_DOC_TYPE=MEMO.MEMO_TYPE (+) AND
    ITEM.ITEM=C_STD_COST.ITEM (+) AND
    ITEM.REVISION=C_STD_COST.REVISION (+) AND
    AR_DOC.CREATED_DATE>=TO_DATE ('30-05-2006 00:00:00', 'DD-MM-YYYY
    HH24:MI:SS') AND
    AR_DOC.CREATED_DATE<TO_DATE ('14-06-2006 00:00:00', 'DD-MM-YYYY
    HH24:MI:SS')
    ORDER BY
    AR_DOC.CUSTOMER, ITEM.PCThe explain plan showed:
    SELECT STATEMENT
    SORT                ORDER BY
    MERGE JOIN          OUTER
    SORT                JOIN
    NESTED LOOPS        OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS        OUTER
    TABLE ACCESS        FULL              BILL_SO       4
    TABLE ACCESS        BY INDEX ROWID    ITEM          5
    INDEX               UNIQUE SCAN       PK_ITEM           UNIQUE
    TABLE ACCESS        BY INDEX ROWID    BILL_HDR      2
    INDEX               UNIQUE SCAN       PK_BILL_HDR       UNIQUE
    TABLE ACCESS        BY INDEX ROWID    AR_DOC        1
    INDEX               UNIQUE SCAN       PK_AR_DOC         UNIQUE
    TABLE ACCESS        BY INDEX ROWID    CUS_LOC       3
    INDEX               UNIQUE SCAN       PK_CUS_LOC        UNIQUE
    TABLE ACCESS        BY INDEX ROWID    MEMO          6
    INDEX               RANGE SCAN        PK_MEMO           UNIQUE
    SORT                JOIN
    TABLE ACCESS        FULL              COST_ITM      8The views I created were:
    CREATE VIEW C_BILL_DET AS
    SELECT
    AR_CCN, AR_DOC_TYPE, AR_DOC, AR_DOC_LINE, ITEM,
    REVISION, SO_SHIP_QTY, SO_SHIP_EXT_AMT, COST1
    FROM
    BILL_SO
    UNION ALL
    SELECT
    AR_CCN, AR_DOC_TYPE, AR_DOC, AR_DOC_LINE, ITEM,
    REVISION, SHIP_QTY, SHIP_EXT_AMT, COST1
    FROM
      CR_BLSH;
    CREATE VIEW C_BILL_HDR AS
    SELECT
    AR_CCN, AR_DOC_TYPE, AR_DOC, RATE
    FROM
    BILL_HDR
    UNION ALL
    SELECT
    AR_CCN, AR_DOC_TYPE, AR_DOC, RATE
    FROM
    CR_BLHD;The new query is:
    SELECT
    C_STD_COST.MAT, C_STD_COST.LAB, C_STD_COST.OHD, ITEM.PC, C_BILL_HDR.RATE,
    C_BILL_DET.SO_SHIP_QTY, C_BILL_DET.SO_SHIP_EXT_AMT, AR_DOC.CUSTOMER,
    C_BILL_DET.AR_DOC,
    CUS_LOC.NAME, AR_DOC.CREATED_DATE, MEMO.TOT_ORD_QTY, MEMO.UNIT_PRICE,
    MEMO.BOOK_RATE, AR_DOC.AR_DOC_TYPE, MEMO.MEMO_TYPE, C_BILL_DET.ITEM
    FROM
    AR_DOC, C_BILL_HDR, CUS_LOC, C_BILL_DET, ITEM, MEMO, C_STD_COST
    WHERE
    AR_DOC.AR_CCN=C_BILL_HDR.AR_CCN AND
    AR_DOC.AR_DOC_TYPE=C_BILL_HDR.AR_DOC_TYPE AND
    AR_DOC.AR_DOC=C_BILL_HDR.AR_DOC AND
    AR_DOC.CUSTOMER=CUS_LOC.CUSTOMER AND
    AR_DOC.CUS_AR_LOC=CUS_LOC.CUS_LOC AND
    C_BILL_HDR.AR_CCN=C_BILL_DET.AR_CCN AND
    C_BILL_HDR.AR_DOC_TYPE=C_BILL_DET.AR_DOC_TYPE AND
    C_BILL_HDR.AR_DOC=C_BILL_DET.AR_DOC AND
    C_BILL_DET.ITEM=ITEM.ITEM (+) AND
    C_BILL_DET.REVISION=ITEM.REVISION (+) AND
    C_BILL_DET.AR_DOC=MEMO.AR_DOC (+) AND
    C_BILL_DET.AR_DOC_LINE=MEMO.MEMO_LINE (+) AND
    C_BILL_DET.AR_CCN=MEMO.SALES_CCN (+) AND
    C_BILL_DET.AR_DOC_TYPE=MEMO.MEMO_TYPE (+) AND
    ITEM.ITEM=C_STD_COST.ITEM (+) AND
    ITEM.REVISION=C_STD_COST.REVISION (+) AND
    AR_DOC.CREATED_DATE>=TO_DATE ('30-05-2006 00:00:00', 'DD-MM-YYYY
    HH24:MI:SS') AND
    AR_DOC.CREATED_DATE<TO_DATE ('14-06-2006 00:00:00', 'DD-MM-YYYY
    HH24:MI:SS')
    ORDER BY
    AR_DOC.CUSTOMER, ITEM.PCThe explain plan is:
    SELECT STATEMENT
    SORT                ORDER BY
    MERGE JOIN          OUTER
    SORT                JOIN
    NESTED LOOPS
    NESTED LOOPS
    MERGE JOIN
    SORT                JOIN
    NESTED LOOPS        OUTER
    NESTED LOOPS        OUTER
    VIEW                                  C_BILL_DET   4
    UNION-ALL
    TABLE ACCESS        FULL              BILL_SO      9
    TABLE ACCESS        FULL              CR_BLSH      10
    TABLE ACCESS        BY INDEX ROWID    ITEM         5
    INDEX               UNIQUE SCAN       PK_ITEM           UNIQUE
    TABLE ACCESS        BY INDEX ROWID    MEMO         6
    INDEX               RANGE SCAN        PK_MEMO           UNIQUE
    SORT                JOIN
    VIEW                                  C_BILL_HDR   2
    UNION-ALL
    TABLE ACCESS        FULL              BILL_HDR     11
    TABLE ACCESS        FULL              CR_BLHD      12
    TABLE ACCESS        BY INDEX ROWID    AR_DOC       1
    INDEX               UNIQUE SCAN       PK_AR_DOC         UNIQUE
    TABLE ACCESS        BY INDEX ROWID    CUS_LOC      3
    INDEX               UNIQUE SCAN       PK_CUS_LOC        UNIQUE
    SORT                JOIN
    TABLE ACCESS        FULL              COST_ITM     8

    I don't understand.
    I try your with statement and get: "end_date" invalid identifier as an error
    I start my query out:
    WITH start_date as
    (select to_date ('08/15/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM') from dual),
    end_date as (select to_date ('08/18/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM) from dual)
    select sales.id, start_date as callstart, end_date as callend
    where sales.created_timestamp >= start_date
    and sales.created_timestamp < end_date
    UNION ALL
    <<<<<<<here is where you take the last select statement and replace sales with manufacturing>>>>>>>>>>>>>
    UNION ALL
    <<<<<<<here is where you take the last select statement and replace sales with engineering>>>>>>>>>>>>>
    and it still fails.

  • Order split functionality with PP-PI

    Hello Forum,
    I am not sure whether we can use the order split functionality with process orders .  I had implemented it earlier for a client with discrete MFG production type but not aware whether we can do so in process industry (couldn't find the provision to do so in process order operation overview screen function menu path).
    Cheers
    Kaushik

    Hi Kaushik,
    Yes your right.
    Order split functionality is only applicable for Discrete manfg not for PI industry this is major difference between PI & DM.But you can achieve this at the time of process order confirmation.
    Example :-In the Goods Movement Overview of Process Order confirmation FG material is done Auto GR. This FG material Quantity needs to be splitted. Push button "Split" is provided in the bottom of the Goods Movement Overview screen of Process Order Confirmaton.
    Say FG quantity = 25 KG  which is to be confirmed. Client wants to split the FG quantity into 1 KG wise, for this he needs to split into 25 times.
    You can implement this by using below work order
    Please use the WORKORDER_GOODSMVT for splitting the GR in Confirmation
    This u can implement in PI.Also check Mr.Paulo reply that could be one possibility.
    check & revert.
    TnX

  • How do I create a folder or report from a query with a union and parameters

    I have created folders with unions but I am having difficulty coverting a query with a union and parameters.
    The following works great in SQL*Developer without parameters, but I want to change to use parameters for the year and quarter and use it in Discoverer:
    SELECT TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000') FEID,
      AV.FIRM_NAME VENDOR_NAME,
      AV.BIDCLASS CONTRACT_CODES,
      AV.AWAMT AWARD_AMOUNT,
      AV.SOL_MODE FORMAL_INFORMAL,
      AV.CERT BUSINESS_ENTITY,
      AV.ETHNICITY ETHNICTY,
      AV.PO_NUMBER_FORMAT CONTRACT,
      SUM(VP.INVOICE_AMOUNT) AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV,
      CONFIRM.VSTATE_VENDOR_PAYMENTS VP
    WHERE ( ( AV.PO_NUMBER = VP.PO_NUMBER
    AND AV.VENDOR_ID       = VP.VENDOR_ID ) )
    AND (TO_CHAR(VP.PAYMENT_DATE,'Q') = '4')
    AND ( TO_CHAR(VP.PAYMENT_DATE,'YYYY') = '2009' )
    GROUP BY TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000'),
      AV.FIRM_NAME,
      AV.BIDCLASS,
      AV.AWAMT,
      AV.SOL_MODE,
      AV.CERT,
      AV.ETHNICITY,
      AV.PO_NUMBER_FORMAT
      union
    SELECT TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000') FEID,
      AV2.FIRM_NAME VENDOR_NAME,
      AV2.BIDCLASS CONTRACT_CODES,
      AV2.AWAMT AWARD_AMOUNT,
      AV2.SOL_MODE FORMAL_INFORMAL,
      AV2.CERT BUSINESS_ENTITY,
      AV2.ETHNICITY ETHNICTY,
      AV2.PO_NUMBER_FORMAT CONTRACT,
      0 AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV2
    WHERE
    not exists (SELECT 'X'
                  FROM CONFIRM.VSTATE_VENDOR_PAYMENTS VP2
                 WHERE av2.po_number = vp2.po_number
                       AND (TO_CHAR(VP2.PAYMENT_DATE,'Q') = '4')
                       AND ( TO_CHAR(VP2.PAYMENT_DATE,'YYYY') = '2009' ))
    AND (TO_CHAR(AV2.AWDATE,'Q') = '4')
    AND (to_CHAR(AV2.AWDATE,'YYYY') = '2009')
    GROUP BY TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000'),
      AV2.FIRM_NAME,
      AV2.BIDCLASS,
      AV2.AWAMT,
      AV2.SOL_MODE,
      AV2.CERT,
      AV2.ETHNICITY,
      AV2.PO_NUMBER_FORMAT Can someone provide a solution?
    Thank you,
    Robert

    Hi,
    You can take the parameters to the select so that you will be able to create conditions over them.
    Try to use this SQL instead of your and in the discoverer workbook create the conditions and parameters:
    SELECT TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000') FEID,
    AV.FIRM_NAME VENDOR_NAME,
    AV.BIDCLASS CONTRACT_CODES,
    AV.AWAMT AWARD_AMOUNT,
    AV.SOL_MODE FORMAL_INFORMAL,
    AV.CERT BUSINESS_ENTITY,
    AV.ETHNICITY ETHNICTY,
    AV.PO_NUMBER_FORMAT CONTRACT,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    SUM(VP.INVOICE_AMOUNT) AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV,
    CONFIRM.VSTATE_VENDOR_PAYMENTS VP
    WHERE ( ( AV.PO_NUMBER = VP.PO_NUMBER
    AND AV.VENDOR_ID = VP.VENDOR_ID ) )
    --AND (TO_CHAR(VP.PAYMENT_DATE,'Q') = '4')*
    --AND ( TO_CHAR(VP.PAYMENT_DATE,'YYYY') = '2009' )*
    GROUP BY TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000'),
    AV.FIRM_NAME,
    AV.BIDCLASS,
    AV.AWAMT,
    AV.SOL_MODE,
    AV.CERT,
    AV.ETHNICITY,
    AV.PO_NUMBER_FORMAT ,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    union
    SELECT TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000') FEID,
    AV2.FIRM_NAME VENDOR_NAME,
    AV2.BIDCLASS CONTRACT_CODES,
    AV2.AWAMT AWARD_AMOUNT,
    AV2.SOL_MODE FORMAL_INFORMAL,
    AV2.CERT BUSINESS_ENTITY,
    AV2.ETHNICITY ETHNICTY,
    AV2.PO_NUMBER_FORMAT CONTRACT,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    0 AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV2
    WHERE
    not exists (SELECT 'X'
    FROM CONFIRM.VSTATE_VENDOR_PAYMENTS VP2
    WHERE av2.po_number = vp2.po_number
    AND (TO_CHAR(VP2.PAYMENT_DATE,'Q') = TO_CHAR(VP.PAYMENT_DATE,'Q') )
    AND ( TO_CHAR(VP2.PAYMENT_DATE,'YYYY') = TO_CHAR(VP.PAYMENT_DATE,'YYYY') ))
    --AND (TO_CHAR(AV2.AWDATE,'Q') = '4')*
    --AND (to_CHAR(AV2.AWDATE,'YYYY') = '2009')*
    GROUP BY TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000'),
    AV2.FIRM_NAME,
    AV2.BIDCLASS,
    AV2.AWAMT,
    AV2.SOL_MODE,
    AV2.CERT,
    AV2.ETHNICITY,
    AV2.PO_NUMBER_FORMAT,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    Tamir

  • How do I get my ipod to play a playlist from reverse order? (Start with recently added song instead of first added)

    How do I get my ipod to play a playlist from reverse order? (Start with recently added song instead of first added)
    So I'm adding new songs to a very old playlist? Is there anyway that when I add them, they automatically go to top of playlist? How about getting one song to the top of a playlist.  That drag to arrange function is very annoying because it is slow and the playlist does not scroll up very well on a PC.

    Make a new playlist by pressing the little plus button at the very lower left corner of iTunes. An new playlist will appear in the Source pane called "untitled playlist". While the name is highlighted, you can change it to whatever you want. Drag all of the tracks from all the albums that comprise a single book to that playlist. Sync that playlist to your iPod.

  • I want to Facetime my Ipad from my Iphone but they are both set up with the same Apple id.  Do I need to create a new id for one of them in order to facetime with the other?

    I want to Facetime my Ipad from my Iphone but they are both set up with the same Apple id.  Do I need to create a new id for one of them in order to facetime with the other?

    You should be able to call the iPad using your Apple ID from the iPhone. When calling from iPad use the iPhone's phone number to initiate the call.

  • I have a problem regarding sales order line item with confimed quanity

    Hi Experts,
    I have a problem regarding sales order line item with confimed quanity with '0'  with delivery block but confirming the sales order quantity once the order is released from credit check.
    The situation arises as per the below scenarios.
    Scenario - 1 -  When the sales order has two line item - one line item with confirmed qunaity in the schedule line and for the 2nd line item there is no available stock for the Material xxxxxx.
    Initially the sales order is created for the line item 2 with confirmed quantity = 0, and having the delivery block = 01 for the Material xxxxxx  and the order is set with credit check.  Once the order is relased from the credit check.  The quanity for the item 2 where the confirmed quantity will be = 0 ( Where it is not changing the confirmed quantity)
    Scenario -2-  Updating the order qunaity for the line item 2 as (9Pcs) it will goes to credit check and save the order.
    Maintain the stock for the line item 2 ( 5 Pcs).
    Once the order is released from the credit check.  Then  for the line item 2 the confirm quanity will be seting to 5 Pcs with Delivery blcok 01.
    This should not happen, When the credit check is released even though if it has stock based on the delivery blockl it should set the confirmed quanity to Zero.
    Can you please help me how to solve this issue.
    Looking forward for your reply.
    Thanks and Regards,

    Hi,
    I agree with your point.  In the sales order When the complete delivery check box is enabled where the confimed qty is set to zero, it is fine but when we save the orderr it goes to credit check.  Once we release the order using VKM3 where in the sales order the confimed quantity is setting to 5,  But it should set to Zero quantity.  Quatity should not be get confirmed it should be Zero Quantity. 
    Further in SPRO - customizing in the deliveries blocking reasons - It has a tick mark in the confirmation blcok.  But we dont want to remove the - Confirmation Block tick mark
    Please any one can help me if you have any solution to solve this problem.
    Thanks and Regards.

  • Change of sales order in combination with planned/released production order

    Hi Guru's,
    How do you deal with changes in the sales order in combination with planned orders and the scenario how to deal with release production orders?
    Can you tell me the SAP scenario, technically or reports or transactions or user exits, etc?
    Thank you in advance,
    Eric

    Here You have 2 scenarios
    1. Sales order changed at planned order stage
    In this case any chagne of quantity done in the sales order level will be taken care by the Planned order until it was not firmed .
    In case if it was firmed for the increased qty you will get a new planned order getting created.
    In case if it is reduced and if it was unfirmed it will get changed accordingly
    2. Sales order changed at production  order stage
    if the planned order was converted to production order change we can manually changes the respective Production order util no confirmation was done to any operations..
    is all this scenariors you are looking for if it is helpful let me know
    thanks..
    dskumar

  • Decode in order by clause with desc

    I want to user order by clause with decode + desc order.
    somthing like
    ORDER BY DECODE ('SALE', e.sale, 'SALE DESC' ????)
    ????-> How to use desc order with decode
    Thanks in advance

    I thought smart people in this OTN community will understand that I am trying to order by the thisdate column that is timestamp datatype:). My apologize for not being that specific.
    The query I gave is a simple version of the stored procedure I am using. The point is I need to order by - depending on one of the parameters that is passed to the procedure. In simplest decode statements, its something like
    order by decode(p_in_var,'ABC','thisdate asc','DEF','thisdate desc',thisdate asc)
    Here p_in_var is varchar input parameter to the stored procedure.
    Please let me know if there is any more information needed.
    Thx!

  • Duplicate planned order is generated with  one sales order item.

    dear :
    when the production order is confirmed with sales order item.the other new planned order is generated.
    the   requiremet quantity of sales order item  is  1,but the custstock  is 2 .display exception:26. in md04.
    please help me analyze it .
    best regards.

    Hi
    Please check rescheduling horizon in OPPQ(by default it would be 100).
    May be you would have shifted the dates of production order after converting from planned order which had crossed rescheduled horizon. This would generate additional planned order to maintain initial dates.
    If this is the case, increase Rescheduling horizon.
    Regards,
    Krishna Mohan

  • Item text in Purchase Order getting updated with info. record Purchase Order Text

    Hello All,
    I am working in a roll out project and facing issue in text repeating twice for the line item in the Purchase Order for the new company code for which rollout is happening
    Issue:
    Item text in Purchase Order getting updated with info. record Purchase Order Text
    01) PO Text is maintained in the material master under "Purchase Order Text" tab
    02) The PO text that is maintained in material master is getting updated in the Purchase Info. Record
    03) When Purchase Order is created, the "Item Text" gets updated in the Purchase Order automatically only for the new company code for which rollout is happening. when printed, this results in the text getting duplicated twice
    03.1) this behavior is not observed in the Plants/ Company code that is already Live
    Configurations in the system:
    The copying rules for the "Texts for Purchase Orders" is
    Source Object = "Info Record", Source Text="Purchase Order Text", Fix="*"
    We have modified the Purchase Order form to print one of  the condition types maintained for calculating the tax. Other than this there is no change to the plants that are already live.
    I could not locate any "Purchase Organization" / "Company Code" / "Plant specific configuration.
    Am I missing any configuration or where can I look in what is causing this error.
    Request help from the experts in the forum.
    with Regards,
    Dhandapani R

    There is no company/purchasing/plant specific customizing for purchase order text.
    The customizing copying rules for the "Texts for Purchase Orders" affects all equally .
    If the text in the purchase order in ME23N is already filled different to other plants, then you either have a modification in place, or the texts are differently maintained in the referenced data (vendor, material, info record, contract)

  • Production Order Settlement Process with respect to  a Project

    Hello All,
    I know about normal Production Order Settlement Process in discrete industries.
    Can anyone give me the steps for the Production Order Settlement Process if the Production Order is created with respect to a Project in SAP PP- PS Integration Scenario.
    Thanks in advance for your support.

    Hi Experts,
    Can anyone clarify my above queries.
    Thanks in advance for your support

  • Help:the sales order is created with a 0 quantity

    I am able to create the sales order now. and it is showing up in SAP too.
    But i have one more problem.
    The sales order is created with a 0 quantity.
    I was passing quantity in the field COMP_QUANT of the table ORDER_ITEMS_IN.
    Can anyone help me with this, as to what field of the table ORDER_ITEMS_IN should be updated to show the quantity in the sales order
    Thanks

    This is the mistake...
    ORDER_ITEMS_IN-COMP_QUANT you populated, but you missed
    ORDER_ITEMS_INX-COMP_QUANT = 'X'.
    because of this it is not updated.
    try this..
    regards
    vijay

Maybe you are looking for

  • Possible to receive Korean e-mails?

    I received an email written in korean on my gmail account (that is paired with my iPhone), but on the phone the korean text does not show, instead, it shows all the "weird" symbols (usually happens when the computer/iphone does not support multiple l

  • Sequence of the classes called in a standard BADI

    Hi guys,    I have a problem on the sequence of the classes called in a standard BADI occuring in different system.    In the DEV system, the sequence called is A, B, C (Just to illustrate). But, in the QA and PROD system, the sequence called is B, C

  • Nokia 9300i security code locked

    Hi.Does anybody know what to do if I forgot the security code number and the system is locked on Nokia 9300i ?The phone is usless.I tried the master code but it does not work at this problem. thanks 

  • Bluetooth keyboard loosing pairing on logoff/shutdown

    We have a computer in a conferance room with a bluetooth keyboard and mouse attached.  After turning off the HD protection we were able to keep the mouse pairing after a reboot and keep them paired after turning back on the HD protection but still un

  • Change Header for each page

    Hi, i've create an application without login (i choose that when i created the app.). But the template/theme? is shown the apex_public_user and a logout-link in the header or footer (depends from the theme). I'd like to make this invisible and instea