Extract numbers
Hi,
I'm trying to extract just the numbers from these SSN string. Not sure why this expression doesn't work?
WITH T as
(SELECT '222-22-1111' test_string FROM DUAL union all
SELECT '333-33-2222' FROM DUAL union all
SELECT '232-22-2222' FROM DUAL)
SELECT REGEXP_SUBSTR(test_string,'[^-]*') FROM T It only extract the first 3 digits when I need all 9 digits without the dashes.
222
333
232
Hi,
Northstar wrote:
Hi,
I'm trying to extract just the numbers from these SSN string. Not sure why this expression doesn't work?
WITH T as
(SELECT '222-22-1111' test_string FROM DUAL union all
SELECT '333-33-2222' FROM DUAL union all
SELECT '232-22-2222' FROM DUAL)
SELECT REGEXP_SUBSTR(test_string,'[^-]*') FROM T It only extract the first 3 digits when I need all 9 digits without the dashes.
222
333
232
In case you're wondering why you were only getting the first group of digits, the pattern
'[^-]*'means "0 or more of anything except a hyphen".
In each of your strings, that pattern occurs several times. (6 times, to be precise, but that's another question.)
Since you didn't say which occurrance of the pattern you wanted (by passing a 3rd argument to REGEXP_SUBSTR) it defaulted to the 1st occurrance.
When working with regular expressions, it's ofter easier to remove the part you don't want (using REGEXP_REPLACE) than to extract the part you do want (using REGEXP_SUBSTR).
In this case, it's easy enough, and more efficient, to use REPLACE rather than REGEXP_REGLACE, as Sanjay showed you.
Similar Messages
-
Even after deleting the string "Counting to five: one 2 three 4. five." from the string control and replacing it with another string the original string returns after the VI is saved then reopened. Where is this string data coming from? I've attached a copy of the library function. I've been able in my application to get around the problem by replacing the string control with a string constant. But I'm still curious as to what's going on.
Thanks,
Chuck
Solved!
Go to Solution.
Attachments:
Extract Numbers Test.vi 9 KBChuck,
String control has been set to default with the string you are seeing. To change this, enter the new string, right click the control and select
Data Operations>>Make Current Value Default
Now save your vi. -
Extract numbers from mixed string.
How do I extract numbers from a mixed-character string?
These are house numbers and I have some exceptions - examples below.
How do I get rid of the letter/dash part, and keep the numeric part only?
38A
5600B
23-A
Thanks a lot.
-JohnIt does not work if you have a string like 3343S##@1~!234
OP, you can try this:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> with t as(
2 select '38A' c1 from dual union all
3 select '5600B' from dual union all
4 select '5Bas@#$%1SDf3ff`~7' from dual union all
5 select '3343S##@1~!234' from dual union all
6 select '23-A+9' from dual )
7 --
8 select c1,regexp_replace(c1,'[^[:digit:]]') only_num from t;
C1 ONLY_NUM
38A 38
5600B 5600
5Bas@#$%1SDf3ff`~7 5137
3343S##@1~!234 33431234
23-A+9 239
SQL> -
My data in ASCii format like +5.00824E-04,+6.06995E-04,+7.27587E-04. All becomes zero after Extract Numbers.vi in Labview 7. Please help what is wrong?
Extract Numbers.vi simply demostrate extracting decimal numbers. It is not used to extract exponential numbers. To do this, you need use the "Fract/Exp string to number.vi" from String >> String/Number conversion. Or the Scan From String.vi
-Joe -
Hi guys,
I have a column that contains Names with Mobile numbers. How can I get rid off the letters in the column, or how can I extract only the numbers from the column!!!!
Best Regards,Or you can use REAPLCE and TRANSLATE functions if your DB versio is lower than 10g
SELECT REPLACE(TRANSLATE(UPPER('ArunKumarGupta9000888777'),'ABCDEFGHIJKLMNOPQRSTUVWXYZ',' '),' ','')
FROM DUALRegards
Arun -
Alpha field - need to extract numbers
Hello,
I am working on a report that has an alpha field in this format:
00-00-00
The users insert numbers where the 0s are. What I need to do is to add the values in the 3 columns. So for example:
03-03-03
A total of 9.
Any ideas on how to approach this? thanks
DavidIf this is consistently the format and there is never any difference...
Use the LEFT function to pull the first two
//{@GetLeftTwo}
tonumber (LEFT(,2))
The MID function to get the digits in the middle:
//{@GetMiddleTwo}
tonumber(MID(,4,2))
The RIGHT function to get the last two digits:
//{@GetLastTwo}
tonumber (RIGHT(,2))
Then simply do a formula to add all three:
//{@SumThemAll}
{@GetLeftTwo} + {@GetMiddleTwo} + {@GetLastTwo} -
Extract Numbers and count their times
Oracle 10.2.0.1
Windows xp
Table1 is having below data :
Region Region_Name Sales_Allowed (This is also codes of region)
01 R1 26,19,30,04,10,20
02 R2 15,18,01,34,30,10,26,50
03 R3 45,80,12,02,01,48,77
04 R4 11,22,50,26,19,06,45
05 R5
80 R80 12,13,14,15,77Total 80 regions and maximum sales_allowed is 20 regions; i mean there can not be more than 20 regions in a region where sales is allowed.
My requirements :
1.Which region is having highest Sales_allowed. In the above example 02 is having maximum
regions in it.
2.If i wish to know that how many times RegionN is coming in the table as sales_allowed, something like in the above example 26 is coming 3 times (in 01,02 and in 04), may be other region is coming 10 times in different rows; so i want something like :
Output based on above example please:
Region Times
01 0
02 1
03 0
04 1
05 0
06 1
26 3
.. <N>I am sure, this question is in the forum, but not finding the exact/near solution....
Thank you.Or is it more like this?
SQL> ed
Wrote file afiedt.buf
1 with t as (select '01' as Region, 'R1' as Region_Name, '26,19,30,04,10,20' as Sales_Allowed from dual union all
2 select '02', 'R2', '15,18,01,34,30,10,26,50' from dual union all
3 select '03', 'R3', '45,80,12,02,01,48,77' from dual union all
4 select '04', 'R4', '11,22,50,26,19,06,45' from dual union all
5 select '80', 'R80', '12,13,14,15,77' from dual)
6 --
7 -- END OF TEST DATA
8 --
9 select x.rn as region, nvl(y.cnt,0) as cnt
10 from (select rownum rn from dual connect by rownum <= 80) x
11 left outer join
12 (select regexp_substr(sales_allowed,'[^,]+',1,rn) as region, count(*) as cnt
13 from t cross join (select rownum rn from dual connect by rownum <= 20)
14 where regexp_substr(sales_allowed,'[^,]+',1,rn) is not null
15 group by regexp_substr(sales_allowed,'[^,]+',1,rn)
16 ) y
17 on (x.rn = to_number(y.region))
18* order by 1
SQL> /
REGION CNT
1 2
2 1
3 0
4 1
5 0
6 1
7 0
8 0
9 0
10 2
11 1
12 2
13 1
14 1
15 2
16 0
17 0
18 1
19 2
20 1
21 0
22 1
23 0
24 0
25 0
26 3
27 0
28 0
29 0
30 2
31 0
32 0
33 0
34 1
35 0
36 0
37 0
38 0
39 0
40 0
41 0
42 0
43 0
44 0
45 2
46 0
47 0
48 1
49 0
50 2
51 0
52 0
53 0
54 0
55 0
56 0
57 0
58 0
59 0
60 0
61 0
62 0
63 0
64 0
65 0
66 0
67 0
68 0
69 0
70 0
71 0
72 0
73 0
74 0
75 0
76 0
77 2
78 0
79 0
80 1
80 rows selected.
SQL> -
I want to read lines from file, count it and extract numbers from a first line.
i must do un loop?
HI,
i try to explain how to use to LABVIEW TOOLS...
1. USE a for next loop
2. here you must open the file with the VI. read lines from file.
you can choos how many lines you read at same time.
3. the string you can convert into an number.
4. in the loop is the literal counter... this is you line couter....
iun schrieb:
> i must do un loop? -
Parsing and extraction of numbers from select lines in a string
hey guys, i've been running into some issues with my code and i was wondering if you could help me out. currently what i've done is take an xml document returned from a server, put it into a string, and then select specific lines from that string, from which i will extract numbers. here's the string
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:census1="tag:govshare.info,2005:rdf/census/details/100pct/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:census="http://www.rdfabout.com/rdf/schema/census/">
<rdf:Description rdf:about="http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90041/censustables">
<census1:totalPopulation>
<rdf:Description>
<dc:title>SEX BY AGE (P012001)</dc:title>
<census1:female>
<rdf:Description>
<census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1131</census1:_40To44Years>
<census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">327</census1:_62To64Years>
<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">875</census1:_10To14Years>
<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">864</census1:under5Years>
<census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">592</census1:_18And19Years>
<census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">307</census1:_67To69Years>
<census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">689</census1:_55To59Years>
<census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">600</census1:_22To24Years>
<census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">450</census1:_75To79Years>
<census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">331</census1:_80To84Years>
<census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">932</census1:_25To29Years>
<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">534</census1:_15To17Years>
<census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1035</census1:_30To34Years>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">14540</rdf:value>
<census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">970</census1:_50To54Years>
<census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1038</census1:_45To49Years>
<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">949</census1:_5To9Years>
<census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">261</census1:_60And61Years>
<census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">264</census1:_21Years>
<census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">482</census1:_70To74Years>
<census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">208</census1:_65And66Years>
<census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1026</census1:_35To39Years>
<census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">285</census1:_20Years>
<census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">390</census1:_85YearsAndOver>
</rdf:Description>
</census1:female>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">27864</rdf:value>
<census1:male>
<rdf:Description>
<census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1077</census1:_40To44Years>
<census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</census1:_62To64Years>
<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">872</census1:_10To14Years>
<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">862</census1:under5Years>
<census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">511</census1:_18And19Years>
<census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">258</census1:_67To69Years>
<census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">647</census1:_55To59Years>
<census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">569</census1:_22To24Years>
<census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">252</census1:_75To79Years>
<census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">183</census1:_80To84Years>
<census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">969</census1:_25To29Years>
<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">525</census1:_15To17Years>
<census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1024</census1:_30To34Years>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">13324</rdf:value>
<census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">822</census1:_50To54Years>
<census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">987</census1:_45To49Years>
<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">974</census1:_5To9Years>
<census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">215</census1:_60And61Years>
<census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">287</census1:_21Years>
<census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">320</census1:_70To74Years>
<census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">155</census1:_65And66Years>
<census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1140</census1:_35To39Years>
<census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">257</census1:_20Years>
<census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">148</census1:_85YearsAndOver>
</rdf:Description>
</census1:male>
</rdf:Description>
</census1:totalPopulation>
</rdf:Description>
</rdf:RDF>now my first attempt at pulling this off worked just fine, but only for the female demographics, since the tags for female and male are identical (only the numbers/data is different) and my parser would stop after reaching the first round of tags specified.
here's part of my code for that section, located in the main (response is the xml string returned from server):
while ((temp = in.readLine()) != null)
response += temp + "\n";
temp = null;
in.close ();
int left = response.indexOf("<census1:under5Years rdf:datatype=\"http://www.w3.org/2001/XMLSchema#integer\">");
int right = response.indexOf("</census1:under5Years>");
// pull out the text inside the parens
String parsed = response.substring(left+77, right);
double parseddub = Double.parseDouble(parsed);
//divide the group Under5Years into Under12Mo and 1to4Yr
double Group1Adub = parseddub*.25;//25% for Under12Mo
Group1Adub = Math.ceil(Group1Adub);
int Group1A =(int)Group1Adub;
double Group1Bdub = parseddub*.75;//75% for 1to4Yr
Group1Bdub = Math.ceil(Group1Bdub);
int Group1B =(int)Group1Bdub;
//..need to basically duplicate this for 3 other age groups
int Group1 = Group1A;
System.out.println("Server response:\n" + "Female");
System.out.println("Under 12 Months: " + Group1);now basically, everything works great for the female data, but i would like to somehow loop this or selectively parse by line and then extract information from those selected lines. any thoughts? i would really appreciate some insight thanks.lol no offense taken. sorry for the confusion, please disregard my earlier statements... :)
i actually was able to get the thing working, i just didn't quite understand what i was doing at first.
however, i noticed that the regex only handles the first four lines of each group (male and female). i was wondering if there was a way to do it that's non-sequential?
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:census1="tag:govshare.info,2005:rdf/census/details/100pct/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:census="http://www.rdfabout.com/rdf/schema/census/">
<rdf:Description rdf:about="http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90041/censustables">
<census1:totalPopulation>
<rdf:Description>
<dc:title>SEX BY AGE (P012001)</dc:title>
<census1:female>
<rdf:Description>
<census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1131</census1:_40To44Years>
<census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">327</census1:_62To64Years>
-<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">875</census1:_10To14Years>
-<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">864</census1:under5Years>
<census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">592</census1:_18And19Years>
<census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">307</census1:_67To69Years>
<census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">689</census1:_55To59Years>
<census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">600</census1:_22To24Years>
<census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">450</census1:_75To79Years>
<census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">331</census1:_80To84Years>
<census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">932</census1:_25To29Years>
-<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">534</census1:_15To17Years>
<census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1035</census1:_30To34Years>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">14540</rdf:value>
<census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">970</census1:_50To54Years>
<census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1038</census1:_45To49Years>
-<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">949</census1:_5To9Years>
<census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">261</census1:_60And61Years>
<census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">264</census1:_21Years>
<census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">482</census1:_70To74Years>
<census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">208</census1:_65And66Years>
<census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1026</census1:_35To39Years>
<census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">285</census1:_20Years>
<census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">390</census1:_85YearsAndOver>
</rdf:Description>
</census1:female>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">27864</rdf:value>
<census1:male>
<rdf:Description>
<census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1077</census1:_40To44Years>
<census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</census1:_62To64Years>
-<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">872</census1:_10To14Years>
-<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">862</census1:under5Years>
<census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">511</census1:_18And19Years>
<census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">258</census1:_67To69Years>
<census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">647</census1:_55To59Years>
<census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">569</census1:_22To24Years>
<census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">252</census1:_75To79Years>
<census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">183</census1:_80To84Years>
<census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">969</census1:_25To29Years>
-<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">525</census1:_15To17Years>
<census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1024</census1:_30To34Years>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">13324</rdf:value>
<census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">822</census1:_50To54Years>
<census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">987</census1:_45To49Years>
-<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">974</census1:_5To9Years>
<census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">215</census1:_60And61Years>
<census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">287</census1:_21Years>
<census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">320</census1:_70To74Years>
<census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">155</census1:_65And66Years>
<census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1140</census1:_35To39Years>
<census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">257</census1:_20Years>
<census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">148</census1:_85YearsAndOver>
</rdf:Description>
</census1:male>
</rdf:Description>
</census1:totalPopulation>
</rdf:Description>
</rdf:RDF> using the regular expression, i can parse the string, but what i really need is to only parse the 8 lines designated, and they are not in sequential order, which makes it somewhat problematic.
the format of the output i want to get should be as in the following example (female: under5, 5to9, 10to14, 15to17):
[864, 949, 875, 534]
same format for male of course. i'm just not sure how to edit the regex so that it can select only the lines i'm concerned with...? thanks so much i really appreciate this. -
Extraction of Numbers from string in oracle
Dear All,
I have a AplhaNumeric field in my source table which holds the string with numbers and caharcters .i need to extract only numbers and to load into the target table which of number type.
can any one suggest me about how to do this?
regards
kumarHi ,
I have a table called smitems with column smitmqtyremarks which holds alpha numeric characters .nearly 180 records exists in this table.
i need extract numbers for this field and load into my target tables.
here i am giving sample rows for this field :
smitmqtyremarks
13 قطعة
4 لحاف
31 قطعة
120 قطعة
57 قطعة
110 قطعة
127قطعة
169 قطعة
12 مفرش
10 مفارش
110 قطعة
170 قطعة
20 خرطوشة
28 قطعة
60قطعة
70 قطعة
80 لعبة
70 قطعة
20 قطعة
60 قطعة
50 قطعة
10 رولات
4 رولات
35 دسته
50دستة
7 رول
3 اثواب قماش
خمسة خرطوشة سجائر
50 جاكت حريمى ورجالى
10 رول اقمشة 4 دسته
420 جوارب اطفال
60 خرطوشة سجائر
12 رول
15 خرطوشة
110 علبة
45 قطعة
40 قطعة
44 قطعة
22 قطعة
3 خرطوشة
468 قطعة
38 قطعة
80 رول قماش
2 رول
6 رول اقمشة
13 رول اجنبى الصنع
100 دسته صينى الصنع
18 رولات ملابس
10دسته
90قطعة
33 قطعة
39 قطعة
42 قطعة
300 ايشارب
500 قطعة
19000 ك 0ج
607 قطعة
24 قطعة
45 قطعة
40 اروسه
5 رول اقمشة اجنبية الصنع
75 قطعة
5 قطعة
4 رول
26 قطعة
50قطعة
105 قطعة
650 جرام
65 قطعة
50 خرطوشة
4 خرطوشة
80 قطعة
100 بنطلون
500 قطعة
40 قطعة
42قطعة
1 خرطوشة
14 قطعة
80 قطعة
7 خرطوشة سجائر
230 لمبة
50 قطعة
50قطعة تليفون
14 كرتونة
4 كرتونة احذية
17 كرتونة خزف
22 لحاف
16كرتونة ادوات صحية
8كرتونة
28 كرتونة
2كرتونة
15كرتونة
115 قطعة
6448
1937قطعة
1937 قطعة
2628كجم
6.980طن
9 كرتونة
18 شفاط
صواميل حديد
3كرتونة +20 قطعة
39.480طن ق.غ سيارات
25كرتونة مصنوعات خزفية
50بنطلون
8 كرتونة كلبسات
20كرتونة اكسسوار حريمى
279كرتونة لحوم
38 اطار كاوتش
10كرتونة
4كرتونة
10كيلو
عدد5 ماكينات
41سيارة
سيارة
90 قطعة ملابس
22250كجم
1793كجم
1371كرتونة زجاج
مستندى
252شاشة
5كرتونة
320قطعة
45خرطوشة
98 قطعة
10لفات
25كجم
320كجم
5كراتين
47طرد
50قطعة
117كجم
1200 قطعة ملابس
5كجم
75جهاز
40قطعة
5كراتين
10كجم
250ق
200ق
200 توب
20لفة
30لفة
2دستة
95قطعة
70قطعة
57523طن طلمبات مياه
43732كجم
755كرتونة
10.645طن
1537طرد
11751كجم
مكبس
77426.80متر
2600قطعة
339طن
15120كجم
مختلفة
267طرد
1200كجم
189عبوة
499كرتونة
10000كجم
960طرد
15.770كجم
111قطعة
174طرد
22000كجم
473000علبة
6720كجم
145خرطوشة
2500طن
3660كجم
27824كجم
8682كجم
14000كجم
6400كجم
133كرتونة
2738كجم
the characters are in arabic here.
hope it clears my issue.
please suggest me the right query for this to get only numbers
thanks
kumar -
Extract/Scan for numbers from multiple lines of strings
Hi All,
I would like to extract numbers (the data) obtained from a serial acquisition which will be shown in multiple line of strings:
$#pressure 20
!@temperature 100
#voltage 1.2
I want to extract 20,100 and 1.2 so that I can do further data manipulation. Should I use match regular expression ? I could not get a proper regular expression to extract the numbers.
Thank you !
Solved!
Go to Solution.pokerprof wrote:
Hi there! Yes your method works, but it would be better if we can keep all the data into an array separated to pressure, temperature and voltage since we are continuously acquiring data.
Can we put it into array ?
Pressure Temperature Voltage
20 100 1.2
21 101 1.2
Whose method? You don't say who you are referring to (and if you don't quote at least part of a message, we don't know unless you tell us).
This is no time to keep your cards close to your chest, pokerprof .
Cameron
To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.
To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
LabVIEW Unit 1 - Getting Started
Learn to Use LabVIEW with MyDAQ -
Can anyone help me get back into my numbers App please?
I have simply been backing up to iTunes using the sync function.
My most recent backup using that method was a bit too old. To get a more recent backup of my data, I decided to do another sync backup before uninstalling Numbers from my system. (I did have the sense to copy the previous iTunes backup to another file folder on my PC before making that last sync - just in case I need it.)
Is there some way to extract Numbers spreadsheets from the iTunes sync backup? I haven't found any way to access these spreadsheet except by using Numbers. Since Numbers isn't working, I seem to be stuck. I did find some software that extracts a variety of data from iTunes backups but it doesn't extract Numbers data. -
More efficient way to extract number from string
Hello guys,
I am using this Regexp to extract numbers from a string, and I doubt that there is a more efficient way to get this done:
SELECT regexp_replace (regexp_replace ( REGEXp_REPLACE (' !@#$%^&*()_+= '' + 00 SDFKA 324 000 8702 234 | " ' , '[[:punct:]]',''), '[[:space:]]',''), '[[:alpha:]]','') FROM dual
{code}
Is there a more efficient way to get this done ?
Regards,
FatehOr, with less writing, using Perl syntax \D (non-digit):
SELECT regexp_replace(' !@#$%^&*()_+= '' + 00 SDFKA 324 000 8702 234 | " ','\D')
FROM dual
REGEXP_REPLACE(
003240008702234
SQL>
{code}
SY. -
How do I have to define a regular expression to filter out data from file?
Hi all,
I need to extract parts of lines of a ASCII file and didn't get it done with my low knowledge of regular expressions
The file contains hundreds of lines and I am just interested in a few lines, within that lines I just need a part of the data.
One original line looks like that:
TP3| |TP_SMD|Nicht in Stueckliste|~TP TP_SMD TESTPUNKT|-|0|87.770|157.950|0|top|c| |other|TP_SMD|TP_SMD_60RF-TP
Only the bold and underlined information is of interest, I don't need the rest.
I can open that file, read in each line but then I am struggling to pick out only the lines of interest (starting with TP), taking that TP with its number and the coordinates following later on and then writing these shortened lines to a new text file. So the new line should look like that:
TP3; 87.770;157.950;0 (It doesn't matter if the separator will be ; or |)
I thought of using regular expressions - is that the right way or is there a better approach?
Thanks & regards,
gedi, using LabVIEW 8.5
Regards,
gediHi max,
for finding a specific part of a string you can use the "Match Pattern" VI, it is located in the Strings Palette.
Maybe the Extract Numbers.vi example in the examples browser library can help you.
What I did to filter out my data of interest is first to sort out only the columns which I want to have -
then there are still a lot of lines remaining I don't need (this is the thing described above).
The rest I am going to filter out with a (then easy) regular expression with the "Match Pattern" VI.
Regards,
gedi
Regards,
gedi -
Updated to 10.6.1 and now won't log me in at all! HELP!
Upgraded our black Macbook (bought July 08) to 10.6.1. Started having wonky issues (firefox crashing, beach-balling all over the place, etc) with install of SL. After patch update mail wouldn't open. Then after the restart I clicked the username and goes to the wallpaper but no icons, no nothing and eventually just returns to the login screen. I'm dead in the water...what can I do?
I have simply been backing up to iTunes using the sync function.
My most recent backup using that method was a bit too old. To get a more recent backup of my data, I decided to do another sync backup before uninstalling Numbers from my system. (I did have the sense to copy the previous iTunes backup to another file folder on my PC before making that last sync - just in case I need it.)
Is there some way to extract Numbers spreadsheets from the iTunes sync backup? I haven't found any way to access these spreadsheet except by using Numbers. Since Numbers isn't working, I seem to be stuck. I did find some software that extracts a variety of data from iTunes backups but it doesn't extract Numbers data.
Maybe you are looking for
-
How to use cfloop index value as part of another variable
Hello, I have a RATE form that first asks "how many rates will you be adding?" that answer generates a series of form elements based on the answer. You then have a form grid to populate, 3 values for each rate (price, code, name). This part works fin
-
ORA-00604: error occurred at recursive SQL level 1 (10G)
I was adding a default schema setting to a user id, saved the role and got the above error. ID hidden. All the roles below had default already added but had not caused error and some had been in place since Oracle9i SQL> REVOKE "ROL_HOBSONS_SCHEMA_VI
-
This question was posted in response to the following article: http://help.adobe.com/en_US/lightroom/using/WS2bacbdf8d487e582-4e663b4513220e78a1e-8000.ht ml
-
How do I sync Notes from computer to iPhone?
I can get the notes from my iPhone onto my computer, but not the other way around.
-
JDBC receiver adapter to call MS SQLServer stored procedure with parameters
We are trying to use the JDBC receiver adapter to call a stored procedure in MS SQLServer with parameters. According to the help documentation for the JDBC receiver adapter for action=EXECUTE, "The elements within the stored procedure are interpret