Retrieve only the part number of a varchar column using select

Hi all

I have the type of lines
GauravSer101
GauravSer104
GauravSer106
Gerard-Ser1789567
Approve-Ser1789456

in a table.

I need a select statement that returns only the part number associated with specified items, above, so my output should be like this

101
104
106
1789567
1789456

From this point, it is fixed as characters last few must include numbers. That is to say a finished element always at least one digit.

Can someone please indicate such a select statement?
I really need to sort items based on the part number are attached to them, not on the entire element.

Kind regards
Gerard

3 order of rtrim (translate (lower (col1),'0123456789 ', ' 0000000000'), '0') / / desc
4, to_number (ltrim (translate (lower (col1), 'abcdefghijklmnopqrstuvwxyz',' @'), ' @')) CSA;

I would avoid to enter whole alphabet:

SQL>    select col1,
  2         trim(translate(col1,'0123456789 ',' ')) alpha,
  3         to_number(trim(translate(col1,translate(col1,'0123456789 ',' '), ' '))) num
  4  from   t
  5  order by trim(translate(col1,'0123456789 ',' ')) desc,
  6           to_number(trim(translate(col1,translate(col1,'0123456789 ',' '), ' '))) asc;

COL1           ALPHA                                                           NUM
-------------- -------------------------------------------------------- ----------
GauravSer100   GauravSer                                                       100
GauravSer101   GauravSer                                                       101
GauravSer102   GauravSer                                                       102
GauravSer1000  GauravSer                                                      1000
ApproveSer100  ApproveSer                                                      100
ApproveSer101  ApproveSer                                                      101
ApproveSer102  ApproveSer                                                      102
ApproveSer1000 ApproveSer                                                     1000

8 rows selected.

Nicolas.

Tags: Database

Similar Questions

  • need to get the part number for fan of cooling of the laptop dv6 of my desire

    s/n [number of Series edited by Moderator]

    p/n C2L44UA #ABL

    less than two years old fan cooling makes rattling noises now, check the dust, cleaned air jet led, the still small makes fan noise rattling sound, need to get the part number and get a very convenient where the fan dies every day.

    Please help. the hp site "to find the part number" does not work, only list other pieces, but no cooling fan.

    DV6 - 7250CA

    nVidia GT630M graphics i-7 mobile quad-processor

    To be used on the computer models equipped with an Intel processor and a graphics subsystem with discrete memory 682061-001

    HP $51

    eBay $37

    eBay uses $28

    Your manual

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • HP will not provide the part number for print head?

    I get very annoyed at the phone support and HP website.

    I want just the part number HP for printing to the printer HP Officejet 6000 (CB051A) heads!

    We have more than 25 of this model and they are very reliable, but the heads begin to go - that's the ONLY problem. Throw away them in order to print heads, considering that you can always get pieces of plastic for the things would be ridiculous, not to mention very pollutants.

    Please could someone tell me the part number or HP, why these printers are so reubbish we should bin them and buy the equivalent which is identical but with slightly different rooms which means that all current stocks of ink is to go to the dump!

    DO NOT SEND ME ON SOME WEBSITE "PARTSURFER' '-J' I TRAWED ALL HP WEBSITES!

    Simon

    Hello

    Please visit the following link:

    http://www.Amazon.com/genuine-HP-printhead-OfficeJet-printer/DP/B0041969Z6

    I hope this helps.

  • Is it possible to order the right recovery disk set by using only the serial number?

    Hello

    I'm trying to order a set of recovery disc for what is customized for VAIO laptop. I would like to be able to put it back exactly the same way that they were shipped originally. For some strange reason, because I was not asked for S/N, I know that I will not ship the correct game.

    Since there is no return on the software, how can I be sure it's the correct game before ordering? Is their way to get the part number control myself using only S/N, if not, how about raising via serial number?

    I've already tried this https://servicesales.sel.sony.com/ecom/accessories/web/categorySearch.do?operation=subCategorySearch... but do not recover my particular model because it is Canadian model purchased.

    Your help is really appreciated.

    Thank you for your support.

    They are here:

    MODEL: PCG - 31112L

    MODEL NAME: VPCZ1390S (was a personal shopping via the online order of Sony of Canada with additional features and applications added - more than the Basic with the same model name model).

    Please consult this site raw and obsolete from where it was originally custom. Although it is more useful, but it can provide an idea of what I mean, the link is http://store.sony.ca/webapp/wcs/stores/servlet/SYCTOProcess?storeId=20153&langId=200&catalogId=10080...

    I think the specific set of recovery disks only who would be able to restore this address to his State of origin as the day, it was shipped via Sony, should be stopped by S/N and perhaps along the ST as well. If it is ordered using just the model and or the name of the template, the result would be a generic RDS used on all of the same model and would not now for his counterpart custom, with still the same exact model information.

    SERIAL NUMBER: J004DSU8

    SERIAL NUMBER: 54047221-0000247

  • How to select only the part by using the sql query

    Hello

    I have the task to retrieve only the integral of the input text by using the sql query.

    The entry is as follows

    Entry for the price setting

    $12.5 (FYI without space)

    $ 12.5 (FYI single space)

    $ 12.5 (double space FYI)

    $12.5 (FYI multiple space)

    $12.5 (FYI multiple space)

    Output expected of 12.5

    The price is the type varchar2 column in the store_price table.

    Please let me know how to achieve this.

    Thanks in advance.

    If this is always the case that you get a $ followed by a number of places, you can use something like:

    Select to_number (ltrim ('$ 12.5',' $')) DOUBLE

    or

    SELECT ltrim ('$ 12.5',' $') OF double

    but take care of your nls_numeric_character settings if they are defined so that, for example, a comma is the decimal separator, you will have a problem.

    HTH

  • What is the part number?

    I want to order the internal hard drive for a Latitude D820 caddy. However, I don't seem to be able to find the part number when I go to the Dell store. Any tips?

    To clarify, I don't want the 2nd carriage drive (only slots in the CD/DVD drive Bay). I want the internal caddy that holds the main internal drive.

    Thanks in advance.

    At latest

    Harold


  • Re: Satellite 1130-z24 - looking for the part number or a screen

    Hello world

    Never done this before, are looking for the part number or a screen for the z24 1130 above

    help please.

    Hi michael,.

    In my opinion, you should contact an authorized service provider. Why? Guys can you tell the exact part number and order a new replacement screen for you. On the Toshiba site, you can search for them.

    Alternative look on eBay. Here you can often get second hand spare parts. The screen is an expensive item so maybe you have a little luck on eBay.

  • What is the part number for Toshiba for Satellite Pro L20

    Morning

    Anyone happen to know the part number for Toshiba Satellite Pro L20? I seem to have misplaced mine.

    Thank you
    If

    Hello

    I put t know what number you mean exactly, but there are several different models of Satellite Pro L20 what different numbers.
    All the necessary details and all the serial numbers, you will find on the label that was placed at the bottom of the unit. Please check this box.

    If you need these details for the part order or recovery cd, you must contact the after-sales Service of Toshiba partner. Here, you can order parts all supported.

  • Re: What is the part number?

    Hello people...

    I was wondering what the part number is suppose to say? Does this affect the specification of your laptop to another? for example, I have this laptop [Satellite A300 - 1 G 5 | http://eu.computers.toshiba-europe.com/innovation/jsp/SUPPORTSECTION/discontinuedProductPage.do?service=EU&com.broadvis ion.session.new = Yes & PRODUCT_ID = 1055589]. As you can see from the link, the laptop displays a part number: PSAG4E-_ * 03801 MG 3 * _. On my laptop cover, the label of the model is identical to the first part, but different on the second, its written like this: PSAG4E-_ * 03801HAR * _, have you noticed the difference? How important is this difference?

    I'll explain why Im concerned about it once I get a clarification on what means the part number... Thank you

    Hello Poison

    AFAIK, part number is a kind of identification number. Each laptop model is available with several different hardware configurations and different hardware components.

    Your Satellite A300 has PSAG4E model number. MU by Satellite A300 has PSAG8E part number.
    When you visit the Toshiba download page, where you can choose model right after the part number. Drivers available for your PSAG4E probably won't be the same as for my PSAG8E.

    I don't know what the difference is, but maybe my laptop model has other graphics card, the sound card or the card wireless network may be. This part of the part number is important to you.
    Other numbers behind this first part of the part number is depending on the country and it is absolutely irrelevant for you.

    So, what's your concern?

  • What is the part number of motherboard for Satellite L300D-23Z?

    Hello

    I need to know the reference number of the motherboard for my computer.
    I have been damaged the video chip. Would you be kind enough to give me the part number, as I need to buy a new one.

    Thank you

    + The message was edited: assignment has been translated.

    Hello

    All the Toshiba laptop parts can be ordered directly from Toshiba authorized service provider available in your country.
    ASP contact and try to get a.

    But to be honest, the repair can be a costly affair for the new the new motherboard is very expensive part

  • Pavilion G7 1355 A9Y70EA: where to find the part number for fan of cooling for G7 and where to order of

    I need the fan cooling replaced on my Intel I5 G7 but hp support cannot or does not give me the part number or where I can buy in fact leave to the United Kingdom. Someone help? Thanks in advance...

    Hi Jim,.

    I do not work for HP, but as much as I can see, their parts store store this element.

    However, the fan that you find on Ebay should be good as long as the reference no.. Games - the fan is the same for both Intel and AMD (and no matter that the machine have discrete graphics or UMA).

    Best regards

    DP - K

  • Can you please provide me with the part number for the screen for model #: NX. SHKAA.001?

    Can you please provide me with the part number for the screen for model #: NX. SHKAA.001 (AO1 - 131 M-C1T4)?  The first ten digits of the serial number are NXSHKAA005.

    Matt or gloss is what it looks like. Some like not brilliant but because most are a reflection. I would say that they would work as long as the resolution of the size and the backlight are the same.

  • How can I print only the part selected a page?

    When I highlite prints part of the entire page. How can I print only the part selected page?

    Try:

    Highlite your text

    Press CTRL + P to start the print menu

    "All" is selected by default in the scope . Change it by selecting 'selection ', and then click OK.

    This example shows only the text that is selected. Microsoft® Security MVP, 2004-2009

  • I have a HP G71 model #G71-329WM. I need to replace the optical drive. What is the part number?

    My HP G71 model #G71-329WM will not load a CD or DVD so I need to replace the optical drive. What is the correct part number? Thank you

    Hello:

    Here is the link to the service manual for your laptop.

    http://h10032.www1.HP.com/CTG/manual/c01713747.PDF

    Replacement of optical discs with reference numbers HP are in Chapter 3, page 33.

    You can also read the instructions in Chapter 4 on removing the drive and get the number off of it, which is normally on a white sticker.  A reference to 6 digit-3 digit number (123456-001)

    You can search by the number of coin on eBay for a used camera but work or you can probably buy a new one at HP by entering the part number on the link below.

    http://h20141.www2.HP.com/hpparts/default.aspx?mscssid=6287767FBDD34F3696CF3D0837BDBC96

    Paul

  • ACROBAT BUSINESS TOOLS has been installed on my PC by Dell. Now I have to reinstall the software, but I have only the serial number. Where can I download the software? Thanks for your help.

    ACROBAT BUSINESS TOOLS has been installed on my PC by Dell. Now I have to reinstall the software, but I have only the serial number. Where can I download the software? Thanks for your help.

    Driver downloads & | Reference Dell U.S.

Maybe you are looking for

  • No Lenovo System Interface; Fn keys don't work; Seeing Bluetooth not on

    Hi all I formatted and reinstalled Vista on my x 61 tablet. I installed 3 update system and installedall updates available outside Maintenance Manager, ThinkPad Mobility Center, pc - doc, customer security and rescue and recovery. Here's what happens

  • The State of Machine table

    I need help store two different measurements in two different tables. Both are in a state machine in the same case, and I need to place them in the tables so that I can use both to get a linear fit. The two values are located in the case of 'Calc' of

  • M83 2.5 inch SSD installation

    ATTENTION: This is my first endeavor material addition Introduction experimental set-up in Introduction to the laboratory of engineering computer science and make a cable crossed in Introduction to networking laboratory. Computer type: 10:00 I am try

  • Why did I lose the connection IE after standby mode for one hour or more?

    THAT IS TO SAY 8, XP SP3

  • Suddely judgement! Win 7, weird case

    Hello I need help, my his laptop suddenly stop working when I played the game/music/video As a first step, it works very well, but then, about 1-3 minutes. more later the sound disappeared. When I close the game/music/video/plug-in and out headphones