determine a decimal in a set of data without looking at data

Hello Experts;

I have a set of data similar to below

create table test
(
     id number(30),
     info varchar2(1000)
);

insert into test values (1, '9.4');
insert into test values (2, '10.350');
insert into test values (3, '6.987');

I need a way to determine without looking at the data in the column contains decimal values. In this case, it is the column of information even if it is created as a varchar2. Any help is appreciated. Thank you

If you are really interested in decimal numbers, which are a column that contains 10 would not be taken into account, so I'd be inclined to use something like Frank's suggestion except instead of its predicate WHERE LTRIM (str, "0123456789".)  IS NULL I would use something more like where Ltrim (Rtrim (str, "0123456789"), "0123456789") = "."

As a proof of concept:

SQL > test like)

2 Select 1 id, info ' 9.4 ' Union double all the»

3 select 2, ' 10,350 ' of any double union. "

4 Select 3, '6.987 ' of any union double. "

5. Select option 4, 'Abc.def' from dual union all

(6 select 4, ' 100.20.30.777' from dual)

7 select id, info,.

8-case when ltrim (rtrim (information, "0123456789"), "0123456789") = "."

9. can "only decimal places.

10 other "Non-decimal" end status

11 of the trial;

ID INFO STATUS

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

1-9.4 only decimal

2 10,350 only decimal places

3 6,987 only decimals

Decimals of Abc.def No. 4

4 100.20.30.777 no decimal

It still lacks signed numbers and scientific notation, but would not identify an IP address in decimal form.

John

Tags: Database

Similar Questions

  • How to determine the size of the binary file data set

    Hi all

    I write specific sets of data in table in a binary file, by adding each time so the file grows a set of data for each write operation.  I use the set file position function to make sure that I'm at the end of the file each time.

    When I read the file, I want to read only the last 25 data sets (or numbers).  To do this, I thought using the position set file to set the file position where it was 25 sets of data from the end.  Math easy, right?  Apparently not.

    Well, as I was collecting data file size as I began the initial tet run, I find the size of the file (using file order size and get number of bytes so) as the size increases the same amount every time.  My size and the format of my data being written is the same every time, a series of four numbers double precision.

    I get increments are as follows, after the first write - 44 bytes, after 2nd - 52 bytes, 3 - 52 bytes, bytes 44 4th, 5th - 52 bytes, 6 - 52 bytes, 7th - 44 bytes and it seems to continue this trend in the future.

    Why each write operation would be identical in size of bytes.  This means that my basic math for the determination of the poistion of correct file to read only the last 25 sets of data won't be easy, and if somewhere along the line after I've accumulated hundreds or thousands of data sets, what happens if the model changes.

    Any help on why this occurs or on a working method, all about the problem would be much appreciated.

    Thank you

    Doug


  • XY graph, initialize multiple groups of data and update a single set of data

    Hello

    I have developed a VI to control the coordinates XY of a platform using two engines. A version a little kwicks xy plotter.

    The detail that I could use help in is the following:

    1. I have 469 (or 400 ~ ish, there are two modes) of the discrete points to be initialized/connected to a XY graph such that a cursor on the XY graph can break discrete points. It's well done.

    2. I have to keep track of the current position of XY. It's also well done

    3. I have to keep track of the former x - y positions, where I was able to extract the data correctly. This is done by a switch.

    4. almost all VI has an a giant loop, although sequenced by 0 of the past a structure of case to another until you reach the final "global dummy.

    Now, signals which are processed to the engine through a USB digital signal generator, I think not that the specifications are necessary. Essentially I needed bitmask each individual movement, so the 'engine of movement' part is embedded in the giant of while loop. This means that whenever I have add a new feature to my VI, engine movements slow down, each time that the operating system on the computer decides to run an automatic update, drivers slow down. I do not have the luxury of multi-threading or a microcontroller immediately.

    At this point, my engines are terribly slowly, and I'll try to find a way to make them run faster. I am sure that the bottleneck is actually treatment for my data XY graph.

    My XY graph manages 3 sets of data,

    a. 469 discrete points (table 2 x 469) or 400 ~ ish discrete points (2 x 400 ~ table)

    position current c. (x, y)

    d. "rescued/captured" (2xincreasing up to table 469) positions

    everything has, b, c are inside the while loop. A switch determines the 'a' is used.

    the berries are grouped and then sent in the graph xy inside the while loop. I need the graph to be interactive to the cursor and data.

    Now, is that I wish to run things.

    1. selection from either a or b is responsible to the xy chart (by a switch).

    2 c is updated constantly.

    3 d is updated whenever the data was captured (by a switch).

    Basically, I need a and or b to run only ONCE at initialization of the (and when I decide to swtich from one to the other) and remains constant. In the same way D updates only when a switch has been pressed.

    I failed to find resources too tracing data to the xygraph, and drawing a live data on top selectively.

    I have attached an outdated version of my front as reference. I would like suggestions. Thank you in advance.

    -JLS


  • Determine the decimal when precision is not defined in the structure of the table

    Hi all

    I'm trying to quickly determine the decimal precision of data in more than one column of the table. Fields can simply be defined as 'Number', but always decimal of the House. I don't mean to round to a certain place of the decimal, but rather to determine the maximum number of decimal places contained in the data of a particular field.

    I wonder if anyone of you know a trick to achieve?

    Thanks for the tips!

    andy_schnelle wrote:
    Hi all

    I'm trying to quickly determine the decimal precision of data in more than one column of the table. Fields can simply be defined as 'Number', but always decimal of the House. I don't mean to round to a certain place of the decimal, but rather to determine the maximum number of decimal places contained in the data of a particular field.

    I wonder if anyone of you know a trick to achieve?

    Thanks for the tips!

    Just a guess

    LENGTH(NUMBER - TRUNC(NUMBER)) - 1
    

    Something like that?

    with zz as(
    select 1.111 x from dual union all
    select 1.1 x from dual union all
    select 1.1111 x from dual union all
    select 1.01 x from dual union all
    select 1 x from dual
    )
    select
    MAX(LENGTH(x - TRUNC(x)) - 1)
    from zz;
    
    Output -- "4"
    

    Published by: Vanessa B on February 13, 2013 02:13

  • Find the median of a set of data

    I have a table that looks like this:

    Range

    Set of data: range values

    Data set b: range values

    0.00 - 0.99

    35

    67

    1.00 - 1.99

    35

    40

    2.00 - 2.99

    49

    54

    3.00 - 3.99

    41

    45

    4.00 - 4.99

    36

    38

    5.00 - 5.99

    31

    34

    6.00 - 6.99

    22

    29

    7.00 - 7.99

    30

    20

    8.00 - 8.99

    24

    16

    9.00 - 9.99

    16

    11

    10.00 - 10.99

    15

    10

    11.00 - 11.99

    12

    5

    12.00 - 12.99

    11

    1

    13.00 - 13.99

    5

    2

    14.00 - 14.99

    5

    1

    15.00 - 15.99

    2

    0

    16.00 - 16.99

    1

    0

    17.00 - 17.99

    2

    0

    18.00 - 18.99

    1

    0

    How can I find the median interval for each set of data (A and B)?

    Thanks for your help!

    Median and range are two different things from what I remember. Can you please send a link to a Web site that could describe what a "median line"?

    Median is the average of a set of data (even counting data sets usually take the average < average > the values of two intermediate points)

    Range is simply the max - min.

    Jason

  • Point cloud with missing data and 3 sets of data

    Hello

    I'm doing a scatter diagram that has 3 sets of data in it (i.e. 3 plots on the same graph), except that 2 of my sets of data have a missing value while my third set has all the values. I end up getting 2 lines that are disconnected. I can't just remove the line containing the missing data for the 2 sets of data because since my category axis is time, my data points get shifted and no longer appear at the right time. This is the chart that I have.

    Thank you.

    Hi Gabrielle,.

    If there is a diagram of dispersion, the x axis is a value axis. If you have auto selected for the min and max values on this axis, the scale may change when you remove the data point, 15, 85, but the rest remains in the same position relative to the values on each axis of ordinates. What change will be , however, is the curve on which 15 85 approached a local y maximum.

    Scatterplots will always leave a gap in the line/curve of connection where there are a pair of missing data. There are two ways to close the gap.

    If the chart is an essentially linear relationship, you can use a calculated value is pair up with the lack of value x. The downside of this is that the representation of this point will be indistinguishable on the map of the other data points, measured.

    A better way would be to make two tables, one with the full data set, the other with the partial sets, but with the pair missing completely removed.

    Adjust the cards the same size and have the same scales on each axis, then just remove one of the cards except the data points, the curves connecting the data points, the x axis of ordinates and the legend showing the color and the forms used to plot each series.

    Give a graphic a transparent filling and place it in front of the other.

    Kind regards

    Barry

  • How to set the date and time on my HP Officejet pro 8600 more?

    How to set the date and time on my HP officejet pro 8600 more?  It just on a printed journal Jan-oo-oo fax shows 00:00 AM.  There are no instructions on how to change this.  I need proof that I sent a fax to a certain date and time.  Help, please.  Thank you

    Hello

    Below are the steps to set the Date and time for your device:

    1. On the Control Panel, press the right arrow key ( ), press Setup ( ).

  • Setting the Date

    My new laptop HP - 17 t - x 000 CTO (ENERGY STAR) will not hold the correct date. It starts in 2091. Once I have corrected, he returned at random to 2091. Can someone help me? Thank you-

    Hello

    Verify that the correct date is set in the bios as follows.

    Shut down the laptop.  Tap away at the esc you key start Notepad to open the Start Menu.  Select the option in the Bios ( f10 ).

    If the hour / date here is incorrect, you can correct it as follows.

    You should see that the first field highlighted is the time value - set this to the correct time by using f5 and f6 (f5 will decrease the number & f6 it will increase).  When it is correct, press ENTER to highlight the Minute field and again, use f5 and f6 to set the correct minutes.

    When finished, press the arrow down to select the first Date field.  This should be for the month, so use f5 and f6 to enter the correct value.

    Press Enter to highlight the field day and this, and then press ENTER to highlight the year field and then set this.

    If you are happy with the settings of Date and time, press f10 and press ENTER to save the settings and exit the bios.

    Let windows load completely.  If the Date and time correct does not appear, go to the control panel and set the Date and time correct here.

    Restart computer and check if this has fixed the problem.

    Kind regards

    DP - K

  • App store is empty after that iOS 9 update on iphone 5 c.  Already tried to set a date.  Any suggestions?

    App store is empty after updating iOS on iphone 5 c 9.0.2.  Already tried the suggestion of setting a date.  Still a Virgin.  Ideas?

    Djrash,

    Why not try a hard reset if you have not already. This, now the "home" button and the power button / stop key at the same time until you see the apple logo. I hope this helps! If no answer.

    Thank you!

  • Clock set to date before January 1, 2001. Pop - ups require to accept incoming network connections for: krb5kdc, cups-lpd, MDNSResponder, configd. File system ARDAgent.app has been changed and cannot be repaired by disk utility. Files repaired permissions

    As soon as that connected with the password, the clock is set to date before January 1, 2001. Pop - ups require to accept incoming network connections for: krb5kdc, cups-lpd, MDNSResponder, configd. File system 'System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent' has been changed and cannot be repaired by disk utility. Files permissions were repaired by disk on the install disc utility. How can I stop this?

    Am also using Firefox 43.0.3 browser like Safari.

    'System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent' has been changed and cannot be repaired by disk utility. Files permissions were repaired by disk on the install disc utility. How can I stop this?

    You can ignore the above.

    Utility disk - permission errors, you can ignore

    System preferences/Date & Time/Date & time - is it set to automatically set the date and time?

  • How can I enter BIOS compaq610 screen and set the date, time

    How can I enter BIOS compaq610 screen and set the date, time

    Hello

    See Page 94 or Page 100 (according to what's relevant) of your & Maintenance Guide.

    Kind regards

    DP - K

  • Average values for separate sets of data graph XY multiplot

    Hello

    I'm using Labview 2010 and I'm a bit of a novice, unfortunately.

    So I am currently trying to get average values of the three plots I have on a multiplot XY Chart. I thought the best way to achieve this would be to use the express VI of statistics, but when I try to wire the data I need for this I can get statistics for a set of data and not the other two.

    I don't know how the separately on data sets, as it is not a table.

    If anyone can help me, it would be much appreciated. Sorry for the probable simplicity of the question.

    (The program is basically an ODE Solver, which then displays pressure at different places in a bioreactor).

    In the small LOOP where you have data of y for each parcel in the form of a 1 d table, add a "mean.vi" in the math palette: statistics. AutoIndex the output on the edge of the loop to get a table 1 d containing three ways.

    (In addition, a lot of your code could be considerably simplfified. You can [i] connect directly to the structure of the case and a case of '0' and the other, by default. Better would simply initialize the shift, no means required register. Index table is resizable, so you don't need to a single instance on the lower right corner. Wouldn't be easier to just get the latest column and it wire back the entrance inside the structure cases via the feedback node? No need to "subset of table to replace").

    You have forgotten to attach a Subvi, so we can't really test.

    EDH is a quick project:

  • Placing several sets of data on a graph (LabVIEW for Excel)

    I read in a 2D array (first rank values of the x axis, 2 values for the value axis in line, 30 columns) of a number of excel files. With each iteration of my loop for example, I read in 1 all of these 2D table data, and I'm tracing the curve (using Excel Insert graphic) before I close this file and move to the following.

    I want, however, must be able to generate 1 chart at the end with all sets of data together. So far, whenever I'm iterating, new data erased the old, and in the end I only get 1 set of data (the last game) on the 1 graph.

    I searched through the Forum similar topics, but 1) I have all my data read or typed into a nice big table, they come in the iterations instead, 2) my data values do not share the same values for the x axis, while the beach is almost the same (from 0 to 1) and the number of data points is always 30 (3) I don't think I can use shift registers because all my data is obtained in my loop, when I open Excel (also in the loop) files and read them, so I did not 'Original data' to initialize the shift register.

    Any suggestions on how I was able to read the data, graphics, read the new data, then graph on the same graph without losing my old data?

    Thank you!!

    Kalyie,

    You may need to force your data to have the same category axis.

    Another option would be to insert data in excel instead of a graph. From within excel you could have a set graph in place who knows where the X values and are there for each data set and it will draw it automatically.

    You can also try messing around with the Graph.vi of update to Excel.

    I had limited success with the Excel update Graph.vi, but worth a visit.

    Thank you

    Joel C

    National Instruments

  • Three sets of data to write to a text file

    Hello

    I think it will be a simple problem, but I'm stuck with it.

    If someone could be so kind as to show me how to put 3 sets of data: V-time, parcel SPD, V ^ 2-time on vi, in a single txt file (to be used on a worksheet).

    Please find attached vi.

    Thank you.


  • How to filter through a set of data based on user input

    Hi all

    I'm trying to filter through a set of data, purchase only the files that meet the requirements of users.

    I ask the user to enter three different values, one for a frequency to start another for a frequency of end and also the value of the rated power.

    The way I am filtering from now thanks to this data set is using a function called the regular expression function as well as the analysis of string function to break up the name of file and data digital take-away, then compare these data on the entries of users.

    These values that meet the conditional statement will be sent to a ring of results for a user to go through.

    For now, I filled it is not as much functionality in this method, the user must be very careful in the way which he or she saves files and my program may work correctly.

    I am ataching a photo of this part of the program.

    Thanks for the help.

    I think that my second statement should check on a white paper OR PDM.  Have you noticed the color?  This is a clickable link.  If you read the material here, it should clear up confusion in the first part of my post.

    I have a colleague who, like you, encodes the parameters of the study of the (very long) string of the name of the file.  I always shout at him about it, because it requires him (because you are considering do) build routines for (a) analyzes the names (to retrieve the information hidden in them), (b) to organize the data in a form of "LabVIEW Database" and then (c) figure out how (in LabVIEW) for write "queries" on this database.  More file names are not particularly easy for a human to read, are extremely long and invite more mischief (have you thought about putting your files in folders which are similarly 'file-information-coded'?  Becomes even more messy more fast).

    You might think Oh, "it's too late to make a change, I have already all of these data", but what good is it if you can't analyze easily, group them, sort, etc. ?

    Bob Schor

Maybe you are looking for