15 pts.
 I NEED SQL COMMAND TO EXTRACT THE NUMERIC VALUSE IN BETWEEN THE STRINGS
VCH:FR:AUD/120.18/51.26YQAC/1.35QKAD/14.47QRCO/14.47QREB/1.35QKSB/6.00WGSE/20.91UOVZ

I NEED TO EXTRACT THE VALUES IN THE ABOVE STRING AND SUMM ALL THE VALUES USING SQL COMMAND

EX:120.18+51.26+1.35.....IN THE ABOVE GIVEN REFRENCE



Software/Hardware used:
SOFTWARE
ASKED: October 17, 2009  5:21 AM
UPDATED: January 23, 2010  7:28 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Using what language and what platform?

This is something which would be better done using a regex expression in the client not in the database.

 64,520 pts.

 

i want to write using
Structured query language in Teradata
platform is dataware house

 15 pts.

 

mrdenny is correct; better to do this in code rather than an SQL statement.

SQL is best suited for processing individual columns as opposed to parsing a string of data.

 5,205 pts.

 

If Teradata supports cursors, this is what you will need to use:

Sudo Code:

create temp table values(value int)

Open Cursor
Set variable a = lowest value
Set variable b = highest value
while a <= b
insert into values(value) values(a)
loop
Close Cursor

select * from values order by value

 1,855 pts.