Order Numbers of VARCHAR2 Type

Hey, what I need to do is order columns filled with VARCHAR2 Datatypes by number. The problem is, the numbers are index values and are such that they cannot be converted into numbers. The numbers that need to be sorted are numbers like '10.8.1.9'. Is it possible to sort these rows in numerical order?

SQL> ed
Wrote file afiedt.buf
  1  WITH t as (select '4.10.5.11' as idx from dual union all
  2             select '5.1.4.13' from dual union all
  3             select '1.2.3.4' from dual)
  4  -- END OF TEST DATA
  5  SELECT idx
  6  from t
  7  order by (regexp_replace(idx, '^([0-9]*)\.[[:print:]]*$', '\1') * 1000000) +
  8        (regexp_replace(idx, '^([0-9]*)\.([0-9]*)\.[[:print:]]*$', '\2') * 10000) +
  9        (regexp_replace(idx, '^([0-9]*\.){2}([0-9]*)\.[[:print:]]*$', '\2') * 100) +
10*       regexp_replace(idx, '^([0-9]*\.){3}([0-9]*)$', '\2')
SQL> /
IDX
1.2.3.4
4.10.5.11
5.1.4.13
SQL>

Similar Messages

  • List the intercompany billing numbers from sale order numbers.

    suppose i have a set of sale order numbers. is there any report can list the intercompany billing numbers related to those sale order numbers?  i don't want to use VA03 because it can display only one sale order number.
    thank you very much,
    Anek

    Hi Anek,
    Run the transaction code VA05. Click on the Further Selection Criteria, Select the check box 'Sales Document Type' and click OK. System will ask for the Sale Document Type. ENter the inter company Document Type, Press Enter and select the date range press Enter.
    System will list the orders.
    Hope it helps. Let me know whether it resolves you issue.
    Thanks & Regards,
    Nagaraj Kalbavi

  • Production order numbers

    Dear all,
    The production server in my clients place is crashed a few days before... Then it was made up...
    But the users feel many data are missing...
    For example, In COOIS, If i enter an order type and execute, say nearly 1000 orders are coming..
    SAy from 34500001000 to 34500002000.
    But the order numbers are not serialised.. For exaple, the order numbers are 34500001000,34500001001,34500001002,34500001003,34500001009.......
    SO the question is where do the orders 34500001004 to 34500001008 go..
    Is there any possiblity that this can happen other than due to data loss...
    please guide me..
    THanks a lot..
    sap125

    Dear,
    Couple of things possible.
    Check whether number range is set used for all the order type? Because you mentioned that you are running COOIS for a specific Order type, may be the missing numbers are used by other order types.
    In standard SAP also there can always be a skip in numbers, due to the numbers which are available in buffer is not getting used during unexpected shut down etc... You can check the defination of the numbe range buffering using transaction SNRO- Object "AUFTRAG".
    Please go through this thread where this was discussed earlier [Number Range - Number skip|number range object for production order;
    Regards,
    Prasobh

  • Process Order Numbering

    Hi Gurus,
    In my case, Number range object for Process Orders has been defined in CO82.
    Suddenly some process orders have different naming 14XXXXXX instead of 72XXXXXX.
    I would like to know what else affects the determination of Process order numbering.

    Dear Gameen,
       One process order PI01  number range is 72XXXXXX and another process order PI02 number range is coming with this no.14XXXXXX.  If you need to want PI02 also with 72XXXXXX number range then you can assign PI02 in 72XXXXXX number range.
    Go to CO82, press F6 and select order type PI02 and press F2 then place the cursor on the number range 72XXXXXXX and select Element / Group. Order type Pi02 will be moved.
    Check and revert back,
    Regards / US

  • How can i search several orders at a time using purchase order numbers?

    Hi,
    I need to search several sales orders by using purchase order numbers at a time instead of
    searching for single order at a time.
    And i need to send several order confirmations to the customers at a time, how can i do this?.
    Help me regarding this.
    Thanks
    Raghu

    Hi,
    Go to VA05N
    On initial screen speciefy PO number and execute then you will get report list
    To send this
    Menu LIST >> SEND TO >> Mail reciepient
    Enter the reciepient & reciepient type and send (see list in attachment tab)
    Kapil

  • Fill with blanks(spaces) a VARCHAR2 type

    Thanks in advance,
    I have a VARCHAR2 type rtesta's var of length x(100 char)
    how i can fill(write) it without create a other varchar2 var that it'll be only filled with blanks(spaces). e.g
    rtesta := ' PC'||fil1||'xxx||fill2....
    where fil1 = say 10 spaces.. fill2 = 63 spaces and so on
    I would like something as
    rtesta := ' PC'|| RPAD(null,10)||'xxx||RPAD(null,63) ...
    but.... Oracle treats an empty string as null. And nulls are always a bit special within Oracle. Particularly, rpad('', n) and lpad('', n) returns null.
    Exists a built in for my problem?
    Thanks

    alter table your_table modify(your_column char(100));
    update your_table set your_column = ' '
      where your_clumn is null;  /* (added) But,this is no good for performance */
    alter table your_table modify(your_column varchar2(100));Exapmples.
    SQL> set null (null)
    SQL> create table test (vc varchar2(100));
    Table created.
    SQL> insert into test values ('');
    1 row created.
    SQL> insert into test values ('a');
    1 row created.
    SQL> insert into test values ('abcde');
    1 row created.
    SQL> select substr(vc,1,10) vc,length(vc) len from test;
    VC                          LEN
    (null)               (null)
    a                             1
    abcde                         5
    SQL> alter table test modify(vc char(100));
    Table altered.
    SQL> update test set vc = ' ' where vc is null;
    1 row updated.
    SQL> alter table test modify(vc varchar2(100));
    Table altered.
    SQL> select substr(vc,1,10) vc,length(vc) len from test;
    VC                          LEN
                                100
    a                           100
    abcde                       100----
    I misread OP's problem, sorry.
    Message was edited by:
    ushitaki

  • Change sales orders using ORDCHG Message type

    Hi,
    I am trying to test the changing of quantity on sales order items using message type ORDCHG and process code ORDC. In segment E1EDP01 the action code is set to 002 - item changes. However when the IDoc is posted a new line is created in the order rather than the existing one being changed. The action code in the header is set to 003 - one or more items changed. Does anybody know how to control the change of quantity for an existing item?
    Many Thanks
    Caroline

    Hi,
    Try to populate Logical message code 'CHG' in the EDIDC-MESCOD while you are creating the IDoc.
    If a message code has been entered in the (inbound) partner profiles, the external system must fill the field during IDoc inbound processing.
    Regards,
    Yogesh

  • Is there a way to get the correct order from the dependent types of a sche

    Hi ,
    I have a CT facing the following problem:
    When trying to built a SQL script to create all the object types within a schema using the DBMS_METADATA packages.
    Did insert in a table the names of the types that will be exported following a concrete order, next loop into the table and call the DBMS_METADATA package for each row.
    These type are depedent between them, there are some type attributes calling other types and here the issue
    First : try to generate the order by created column of dba_objects and when the generated SQL script is launched a lot of type appearing as incomplete state due to the order isn't correct.
    Second : try to insert the table ordering by object_id colums of dba_tables view, it appears incomplete types too.
    Currently want to insert the table using a recursive query with connect by against the dba_type_attrs starting with the rows when ATTR_TYPE_NAME is not null (the types that are called by other types), but this way has a issue dificult to resolve: the roots of hierarchy are the rows when ATTR_TYPE_NAME is not null and we've dependencies between roots nodes
    The question is is there a way to get the correct order from the dependent types of a schema?
    Platform: IBM SP AIX
    DB version: 9.2.0.7
    Any help will be appreciated .
    Thanks in advance.

    The xxx_dependencies view should give you the dependencies betwee nthe various types. I would look at something along the lines of:
    SELECT object_name, referenced_name
    FROM (SELECT o.object_name, d.referenced_name
          FROM user_objects o, user_dependencies d
          WHERE o.object_name = d.name(+) and
                o.object_type = d.type(+) and
                d.referenced_type(+) = 'TYPE' and
                o.object_type = 'TYPE')
    START WITH referenced_name IS NULL
    CONNECT BY PRIOR object_name = referenced_nameThe outer join between user_objects and user_dependencies is required to generate the names of types which are not dependent on other types, or do not have other types dependent on them.
    HTH
    John

  • 3rd party order processing GR movement type

    Hi
    In 3rd party order processing the goods are delivered to customer from vendor directly, but for billing purpose we do the GR at plant level(against purchase order)>invoice>Billing
    Physically stock is not delivered to the plant, so when we do the GR(against purchase order),if the movement type is 101 it will updatet the stock. 3rd party delivery is not done,stock will not be reduced. I want to know what is the GR movement type for 3rd party order processing, is it 101 or anyother movement type.

    Hi,
    Check in t.code OMJJ.
    Select movement type 101 and click on update control/WM movement types.
    There you can see this movement type is configured for different update control/WM movment types.
    Few entries are made in the system without value and quantity updates for movement type 101. So I assume, when you do MIGO using 101 movement type against third party purchase order, special stock indicator E and movement type B will be taken for statistical posting. You can do a testing to confirm this.
    Regards,

  • In sales order for the condition type MWST, **Tax code** is displaying wron

    Hi
    In sales order for the condition type MWST, *Tax code* is displaying wrongly at header level i.e. FF instead of AO (under account determination tab)
    AO tax is 0% but for FF it is 19%
    I have checked with the Access sequence it is picking access 08 correctly according to this it should show AO in tax code field for MWST but it is not so..
    There is a manual change for tax classification for material master in va02 initially it was blank now it is changed to ' 0 ' is any way influencing....?
    Even if I consider material tax classification and customer tax code  should not be FF because  tax code  FF is not maintained for the combination of access sequences for condition type MWST
    Please help me.
    Rajendra Prasad

    Dear Rajendra,
    There is a manual change for tax classification for material master in va02 initially it was blank now it is changed to ' 0 ' is any way influencing....?
    Definitely material Tax classification will influence to determine the Tax code.
    -->So Make sure that customer and material master having proper tax classification indicator.
    -->Have you Update the price after changing the tax classification in the sales order.by going to item dat -->condition tab then click on Update push button bottom of the conditions screen.
    -->Once again the check the condition record maintanence also for your MWST access sequence.
    I hope this will help you,
    Regards,
    Murali.

  • MM Purchase Order IDOC NEU output type configuration

    Hi All,
    after creation of Purchase Order in ME21N in ECC 6.0 server, i want an IDOC for Purchase order to be created...........
    i saw there is a standard output type NEU and it has EDI and Distribution Model as medium..........
    when i went to ME21N and specified in message button output type of NEU, then the PO which i created had a NEU in messages but on opening  a new session and running ME21N and creating a second PO, then in this PO there is no output type for NEU....
    So i want to know in SPRO where is the exact location which specifies which output type will be triggered for IDOC creation on PO creation in ECC for message control...............
    plz help guys...........

    Hi,
    If it configured for EDI and Distribution Model , now check condition record in T.code:MN06{ if you are geeting for one PO, you should get for other PO also)
    Also check the following confi. details for Output of Purchase Order
    1. Condition Table
    SPRO > Material Management> Purchasing -> Message -> Output Control->Condition Tables->Define Condition Table for Purchase Order
    Select: 
    Purchasing Doc. Type,
    Purch. Organization,
    Vendor
    2. Access Sequences
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Access Sequences->Define Condition Table for Purchase Order
    3. Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Types->Define Message Type for Purchase Order{NEU}
    4. Message Determination Schemas
    4.1. Message Determination Schemas
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Maintain Message Determination Schema
    4.2. Assign Schema to Purchase Order
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Assign Schema to Purchase Order
    5. Partner Roles per Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control-> Partner Roles per Message Type ->Define Partner Role for Purchase Order
    6. Condition Record
    Navigation Path: SAP Menu-> Logistics -> Material Management -> Purchasing-> Master data->Messages-> Purchase Order-> MN04-> Create ,,,use medium '6' 
    Now you create PO (ME21N) and save it and then release.
    Also check in NACE t.code for standard SAP environment (program 'SAPFM06P', FORM routine 'ENTRY_NEU' and form 'MEDRUCK') as the processing routines and for the output type for default values, a communication strategy needs to be maintained in the Customizing that supports . You can find the definition of the communication strategy in the Customizing via the following path: (SPRO -> IMG -> SAP Web Application Server -> Basic Services -> Message Control -> Define Communication Strategy).
    Regards,
    Biju K

  • Aperture performs adjustments in a different order depending on file type

    Aperture performs Adjustments in a different order depending on file type.
    Here's an example:
    Starting with two copies of an image, one in RAW format (Canon CRW from a D60), the other in TIFF (opened the .crw file in Preview and exported an 8bit tiff file).
    {The test image is a photo of my copy of Aperture on the floor of my studio (which, for reference, is a few points of Cyan off of a neutral grey).}
    The original Image.
    http://members.arstechnica.com/x/adrien/testRAW_originalImage.jpg
    Adjustments
    http://members.arstechnica.com/x/adrien/adjustments.jpg
    The RAW file adjusted
    http://members.arstechnica.com/x/adrien/testRAW_adjusted.jpg
    The TIFF files adjusted
    http://members.arstechnica.com/x/adrien/testTIFF_adjusted.jpg
    Import both of these files (testRAW.crw & testTIFF.tiff) into Aperture.
    Make adjustments to the RAW and TIFF images:
    - Exposure: Saturation -> 0 (lowest possible value).
    - White Balance: Temp -> 3500K (from 5000K).
    It doesn't matter what order you perform these operations in.
    The RAW file is now a neutral greyscale image. With the Saturation set to 0, the White Balance makes no major difference in the image, it stays grey.
    The TIFF file, however, is now a blue tinted greyscale image - much like a sepia-tone effect. Moving the White Balance slider changes the color of the image.
    It appears that Aperture is performing the Saturation and WB operations in a different order: for the RAW file it first performs the WB, then the saturation; while in the TIFF file it performs the saturation first, then the WB.
    The result is the same for a JPEG image.
    The RAW behavior is the 'expected' behavior in photography - White Balance should happen 'before' the Saturation setting.
    I've filed the bug with Apple (number 4394125 at bugreport.apple.com). hopefully they'll fix this.
    Cross posted from this discussion at the MacAch on ArsTechnica forums:
    http://episteme.arstechnica.com/groupee/forums/a/tpc/f/8300945231/m/893007866731 /r/832001796731#832001796731

    Well, there are different ways of achieving this.
    Solution 1:
    You can create a new output type which will be triggered and call a same driver program and the new smart form. I am sure you can customize as to what Purchasing document type will trigger which output type. Get in touch with someone in the function team to get this configured.
    Solution 2:
    No Customizing, let the configuration be the same, but in the driver program change the value of  "TNAPR-FONAM" immediately after the form entry_neu to the new form name based on the Purchasing document type.

  • Process code for 869(EDI ) Order Status Inquiry Message type.

    Hi Gurus,
                       Please can any one help in providing Process Code for 869 Order Status Inquiry Message type.
    Thanks,
    Sudhakar

    Hi Everybody.
    There's no standard process code for LOIPRO Outbound Idocs.
    This Idocs are threated as master data info, and could only be automatically generated by Data Distribution Model.
    BD64.
    Anyway, you can define your own Outbound Process Code in WE41 using CLOI_MASTERIDOC_CREATE_LOIPRO FM.
    You can choose.
    Regards.
    Albert.

  • After Transact Move Order the Supply/Demand Type Disappears in INVDVDSD

    1. SR#: 5474007.993
    2. URGENT Response Needed? (vs. the normal 48 hour or less reply time): Yes
    3. Customer: SIPA S.P.A.
    4. Oracle Apps Version: 11.5.9
    5. Error(s):None
    6. Problem Description/Question:
    1. A WIP job is creates and decriments the Available Quantity; but not the
    Current On-hand in the Supply/Demand Detail form.
    When a pick release is performed, they do not see the WIP job in the
    Supply/Demand Detail form and the Current On-hand does not change.
    2. After transact move order the supply/demand type disappear, available
    quantity at the top right side of the form increases, but there is no line with
    demand identifier wip discrete job = 12615.
    See: "ELTERM_SUPPLYDEMAND_after_patch.doc" at:
    http://gtcr.oracle.com/gtcr-dir/gtcr_12930/5474007.993/
    Is It the intended functionality?
    7. Steps taken to debug issue:
    web-iv "INVDVDSD pick release discrete job"
    Located several bugs:
    Bug 4885821 SCREEN VIEW SUPPLY/DEMAND ITEM NOT CORRECT
    BUG: 2991666 SUPPLY/DEMAND DETAIL FORM (INVDVDSD) DOES NOT
    SHOW ITEMS ON MOVE ORDERS
    BUG: 3671489 SUPPLY/DEMAND INQUIRY FOR ATP ONLY
    SUBINVENTORY INCLUDES NONATP DISCRETE JOBS
    Bug:3517095 MRP:ATP INQUIRY FROM WIP SHOWS WRONG RESULT
    However; none seem to provide a definitive explanation.
    Message was edited by:
    Bob Marchant

    Thx a lot for ur help dr.
    I have activated the material transaction interface and now the stock quantity has decreased.
    I just wish to confirm some points in the creation of the new Order Type.
    I have done the following setups:
    Order Category: Mixed
    Transaction type code: Order
    Fulfillment Flow: Order Flow - Generic
    Line workflow assignment: BO Line - Inventory Interface
    Default return line type: Credit Only Line
    Default order line type: BO Line - Inventory Interface
    Plz confirm if the setups parameters are ok especially the Default return line type: Credit Only Line
    Thanks a lot dr.

  • Auto increment for order numbers

    I am not sure on how to approach this and if its a backend or
    frontend issue (PHP/MySQL).
    Generally when you order something online the site will give
    you an order number that is naturally unique from other orders. I
    have the order_id field which is a primary key and auto_increments
    starting at "1". Is there a way to make it start at a higher number
    like 100000 or would that be a bad idea? Basically, I don't want
    the user to know they are order #1.
    Or would it be more wise (or even possible) to make another
    field that auto_increments starting at the higher number and leave
    the original order_id starting at 1? If that's the case, how would
    I do that? Is it controlled by PHP or MySQL?

    Those order numbers are usually segmented. For instance, some
    of it is
    based on the order date, some of it on your customer ID, some
    of it serial,
    or perhaps many other things, even your ZIP code or the
    dollar amount. You
    could construct that number at either end once you decide how
    you want it
    done.
    "Eiolon" <[email protected]> wrote in
    message
    news:ec2jgf$2hq$[email protected]..
    >I am not sure on how to approach this and if its a
    backend or frontend
    >issue
    > (PHP/MySQL).
    >
    > Generally when you order something online the site will
    give you an order
    > number that is naturally unique from other orders. I
    have the order_id
    > field
    > which is a primary key and auto_increments starting at
    "1". Is there a
    > way to
    > make it start at a higher number like 100000 or would
    that be a bad idea?
    > Basically, I don't want the user to know they are order
    #1.
    >
    > Or would it be more wise (or even possible) to make
    another field that
    > auto_increments starting at the higher number and leave
    the original
    > order_id
    > starting at 1? If that's the case, how would I do that?
    Is it controlled
    > by
    > PHP or MySQL?
    >

Maybe you are looking for

  • Remote client copy (SCC9) runs a very long time!

    remote client copy (SCC9) runs a very long time! how to do it quickly process? (eg use imp and exp-oracle tool, as it can be done to understand what the SAP data has been copied and are now in a different location, for Developers)

  • Ora-00904 when creating a view

    Hello everyone, I'm trying to create a view based on 6 tables, and I'm getting an ORA-00904: Invalid column name error. I also tried to do a basic select * from table_name and inserted one of the restrictions in my where clause and am getting the sam

  • Multi-Owner Diskset problem with SC3.1U4 & Solaris 10

    Hi All, My Problem is after configured the mulit-owner diskset of SVM. If either one node has been restarted/rebooted. The rebooted node can't join back to the diskset like below status. I have tried to use some metaset commands to put the rebooted n

  • Having problems with Genio how do I get rid of it?

    Aloha: Every time I start up one of my browsers i am sent to this address: http://search.genieo.com/?v=gim116410161&t=1407 Genieo does not appear anywhere in my applications folder. However I am afraid that if I use either browser I will be infected.

  • Flush SHARED_POOL and BUFFER_CACHE

    I have a nightly process that executes several steps. One of the last steps is taking about 4-5hrs but if i bounce the instance just before the last step, the step completes within 30-40mins. I'm 10gR1. I even tried flusing shared_pool and buffer_cac