Need to convert the Varchar2 column number for the extraction of data based on the range of values.

Hello

I have a ZIP column which is the Varchar2 data type, it has values such as 2345, 09485, 10900, 07110, 06534.

I have to go look up records from the range of values for the ZIP column as between 00000 and 07500.

Could you give a logic.

Thank you.

Hello

I think you can use the following code:

SELECT T.*

OF t

WHERE the to_number (ZIP) between TO_NUMBER('0000') and TO_NUMBER('07500')

;

CGomes

Tags: Database

Similar Questions

  • Need to convert to black and white for the print command... but it already is?

    Hello everyone. Last night, I introduced an order of printing for postcards, and got an email back asking that I convert the black back. The thing is that there is nothing on the back of the postcard that is not black and white. I have the original photoshop files, I just save it in photoshop pdf format, but how do the black and white if they are already?

    Image > Mode > grayscale.

  • I export to PDF Adobe format expires Aug.2015. Need to convert the PDF file to Word.Repeatedly made to SUBSCRIBE. Can I PLEASE signs for COVERT my tp of PDF WORD file?

    How to use my Adobe export in PDF format to convert PDF files to Word.

    Gene

    Hi 1gene.

    It seems that you just are not connected to the ExportPDF service. If you use a web browser, please clear the cache and then connect directly to https://cloud.acrobat.com/exportpdf. If you want to convert the drive you choose Help > updates to ensure that you have installed the latest versions.

    Please let us know if you still have problems logging in to ExportPDF, and let's dig a little deeper.

    Best,

    Sara

  • Need help with the accumulation of value.

    Hello world

    My version of DB is

    BANNER

    ----------------------------------------------------------------

    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi

    PL/SQL Release 10.2.0.1.0 - Production

    CORE 10.2.0.1.0 Production

    AMT for Linux: Version 10.2.0.1.0 - Production

    NLSRTL Version 10.2.0.1.0 - Production

    Please take a look at the structure of the table, some examples of values, query, and result and help out me.

    create table ppdev_own.product

    (

    number of product_id,

    sold_date date null not activate.

    activate the sold_quantity number not null,

    constraint product_pk primary key (product_id, sold_date, sold_quantity) activation

    ) ;

    insert into product (product_id, sold_date, sold_quantity) values (1000, to_date('12-NOV-2014','DD-MON-YYYY'), 100);

    insert into product (product_id, sold_date, sold_quantity) values (1000, to_date('12-DEC-2014','DD-MON-YYYY'), 150);

    insert into product (product_id, sold_date, sold_quantity) values (1000, to_date('12-JAN-2015','DD-MON-YYYY'), 200);

    insert into product (product_id, sold_date, sold_quantity) values (2000, to_date('12-NOV-2014','DD-MON-YYYY'), 120);

    insert into product (product_id, sold_date, sold_quantity) values (2000, to_date('12-DEC-2014','DD-MON-YYYY'), 170);

    insert into product (product_id, sold_date, sold_quantity) values (2000, to_date('12-JAN-2015','DD-MON-YYYY'), 220);

    insert into product (product_id, sold_date, sold_quantity) values (2000, to_date('13-JAN-2015','DD-MON-YYYY'), 100);

    -Query

    with the temp as

    (select distinct p1.product_id,

    P1.sold_date,

    P1.sold_quantity,

    Count (*) on total_occurrence (p1.product_id partition).

    ROW_NUMBER() over (partition by product_id arrested by p1.product_id) rownumber

    the product p1

    order of p1.product_id,

    P1.sold_date

    )

    Select t.product_id,

    t.sold_date,

    t.sold_quantity,

    case

    When lag (t.sold_quantity) over (partition by t.product_id of t.product_id order) is null

    then t.sold_quantity

    When t.rownumber < t.total_occurrence

    then lag (t.sold_quantity) over (partition by order of t.product_id t.product_id) + t.sold_quantity

    When t.total_occurrence = t.rownumber

    then sum (t.sold_quantity) on (t.product_id score)

    end as sold_quantity_acc

    t temp;

    Result

    PRODUCT_IDSOLD_DATESOLD_QUANTITYSOLD_QUANTITY_ACC
    1000JANUARY 12, 2015200200
    100012 DECEMBER 2014150350
    1000NOVEMBER 12, 2014100450
    2000JANUARY 12, 2015220220
    200012 DECEMBER 2014170390
    2000JANUARY 13, 2015100270 -instead of 270, he must return to 490
    2000NOVEMBER 12, 2014120610

    Please see the comment in bold and help out me. How can I maintain the continuous accumulation of value that will keep calculation of the quantity sold. Please correct me if my approach is wrong.

    Kind regards

    BS2012.

    Select product_id,

    sold_date,

    sold_quantity,

    Sum (sold_quantity) on sold_quantity_acc (partition by product_id arrested by sold_date)

    product

    PRODUCT_ID SOLD_DATE SOLD_QUANTITY SOLD_QUANTITY_ACC
    1000 12/11/2014 100 100
    1000 12/12/2014 150 250
    1000 12/01/2015 200 450
    2000 12/11/2014 120 120
    2000 12/12/2014 170 290
    2000 12/01/2015 220 510
    2000 13/01/2015 100 610

    Concerning

    Etbin

  • How to set an expression by the range of values &amp; run function value entered

    I'm looking for help with an IF statement that focuses on value ranges and executes a sum based on what it finds.
    I use LC D 8, the script runs on FormCalc - Client-side - calculate events. Numericfield1 is a value entered by the user.

    I currently have (which does not work):

    If (numericfield1 > = 1000 < = 4999) then / / I want to check is the power of users lies between these figures

    numericfield1 * 5 / 1000 / / if I want to run this sum only

    else if (numericfield1 > = 5000 < = 9999) then

    numericfield1 * 10 / 1000

    else if (numericfield1 > = 10000 < = 19999) then

    numericfield * 20 / 1000

    endif

    So if I get 2500 in numericfield1 the sum would be: 2500 * 5 / 1000 = 12.5

    I want to keep these ranges of values in these games: 1000 to 4999 | 5000 to 9999 | 10000 to 19999. 20000 to 49999. 50000 to 250000.

    (here also to enforce that 1000 is the lowest possible entry)

    The above work when numericfield1 is anything below 4999, but anything after that he continues to * by 5 then / 1000. Where there should * 10 / per 1000.

    Hope someone can push my thinking in the right direction, thanks in advance.

    You need an "and" in your statement:

    If (numericfield1 > = 1000 and numericfield1)<= 4999)="">

  • compare a value to the range of values in the table and get the value of corr

    Hi all

    I'm a begineer and glued at one point.
    I have a table that has 2 fields
    number of days and the number of cards with values such as:

    number of days number of cards 20 1

    40 2
    60 3
    I have a SELECT query that returns the number of days, I need to get the number of cards based on the number of days.
    As if the select returns 30 I should get 1 as the number of cards, if select returns 48 I should get 2 and so on.

    Please help me

    Thanks and greetings
    SELECT MAX(num_of_cards)
    FROM   your_table
    WHERE  num_of_days <= X
    
  • What is the range of values of type of data accepted by prepareBulk file?

    In the Oracle documentation under "bulk 7.12 load graphics Using RDF Semantic support for Apache Jena", I see the code example for perpareBulk. The third parameter is documented as "type of data file: can be RDF/XML, N-TRIPLE, etc.". I found a thread code example that uses "TTL." as a value as well. It seems that "TTL" is accepted but not documented. What is the range of accepted values for the type parameter of data to prepareBulk file?

    Hello

    You can use the triple data serialization format following as string values:

    "RDF/XML", "N-TRIPLE", "TURTLE" (or "TTL") and "N3".  "RDF/XML-ABBREV" is a synonym for "RDF/XML".

    For the quads, you can use either "N-QUADS" or "TRIG".

    Thank you

    Zhe Wu

  • validate the range of values

    Hey!

    I would like to make a simple script, validate a range of values between 500-1500 and if the value is outside of the range, is marked with red.

    Anyone who could help?

    Thanks in advance!

    Use this code:

    event.target.textColor = (event.value > = 500 & event.value)<=1500) color.black="" :="">

  • Need to convert the library labview created in 4.1 for something that I can use in 8.5

    Is it possible to get a copy of the 4.1 running on Windows XP? Otherwise, I can get my hands on a version of article 7.1 - which translated correctly? This is done so I can interface labview with CED 1401 system to an analog signal.

    Hi DJ,

    Here it is LV7.1

  • Error invalid when you try to convert a varchar2 in number.

    I need to extract the four numbers in the middle of a varchar2 (12) and then converted to number. The Middle four are numbers, but the first four may be letters. I tried
    TO_NUMBER (substr (wptk.ext_wo_num, 5, 4))
    TO_NUMBER (LPAD (wptk.ext_wo_num, 5, 4))
    substr (TO_NUMBER (wptk.ext_wo_num), 5, 4)
    caste in number

    I need to get rid of all 0 which are at first four numbers. Some of the data not 0, and some could have up to three 0 initially. Is it possible to do?
    Thank you.

    Any ideas how to keep the trailing zeros?

    LTRIM will do:

    SQL> select ltrim('00010', '0') from dual;
    
    LT
    --
    10
    

    But it's always nice to see a few examples of data...

  • I have 64 pages in pdf format. I need to convert a half format letter for booklet

    I publish a senior magazine. The advertiser provide copies ad especially in size 8.5 x 11 inches. How to convert these 5 x 8.5 (half letter size)?

    Since you're probably not using the bookmarks or such in the ad, you can consider an approach not normally recommended for a new print PDF of the desired size with adjust selected. Someone else may have a better solution for a regular need, but you can give it a try to see if it meets your needs. Another advantage is that you can use the parameters print or press (or yours) to be sure you have the useful image resolution and embed fonts.

  • Need to create a superior version number for app store

    Hello

    I have an update for an application that has been published with the individual license. Now, I need to download an app with a version number higher DPS 1.1 for the Apple app store to accept the download.

    Problem: I can not find anywhere to set the version number of app.

    (I mean not the adobe number 27/26, but that version which is in iTunes Connect)

    When I click on 'create the app' and updates in the Manager it generates a new application with a higher number in the following order: 1.0.0 1.0.1 1.0.2 1.0.3

    But I need to set manually. Where can I do this?

    Thank you

    Mikkel

    Yes, you must contact the DPS Support for this.

  • I need to get a new serial number for my photoshop CS4.

    My laptop recently crashed and I try to install my photoshop CS4 on my new pc.  I can't activate my photoshop CS4 with serial number provided with the software.

    Thank you

    Find the serial number of your Adobe product quickly

    Error: "serial number is not valid for this product". Adobe Creative Suite

  • What is the table/column name for group of segments data

    Hello!

    I'm looking at the specific table/columns that contain the values for the segments of people group by assignment. Well want to can someone tell me.

    Thank you.

    Jon

    Join the pay_people_groups with per_all_assignments_f with the people_group_id of the column

  • Help needed to convert the ArrayList collection ArrayCollection


    I am converting an ArrayList (Java) to the collection of Flex ArrayCollection.
    Please help me in this, I don't know whether there is a correct approach

    I have a created a class user VO ActionScript Flex with two properties as uname, pass.

    [Bindable]
    var result: ArrayCollection collection

    private void displayDetails(event:ResultEvent):void
    {
    result = event.result as ArrayCollection collection;
    }


    < mx:DataGrid dataProvider = "{result}" >
    < mx:columns >
    < mx:DataGridColumn headerText = "UserName" dataField = "uname" / >
    < mx:DataGridColumn headerText = "Password" dataField = "pass" / >

    < / mx:columns >
    < / mx:DataGrid >

    It's my DAO of Java file:


    ResultSet rs = stmt.executeQuery ("select NAME, PAST by users");
    list = new ArrayList();
    While (RS. Next {}
    User user = new User();
    user.setUname (rs.getString (1));
    user.setPass (rs.getString (2));
    List.Add (User);

    }


    back list;

    With the code below, the DataGrid displays is empty without data, please help me where I am wrong doung

    I have to do something more? The data comes on the lcds Server console.

    Help, please.

    Hi Kiran,

    Try this once...

    private void displayDetails(event:ResultEvent):void
    {
    result = new collection ArrayCollection (event.result as Array);

    }

    Just try to debug by placing the stop point and make sure that you have found event.result as array... If not, then change your code accordingly.

    Thank you

    Jean Claude

Maybe you are looking for