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
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.
i want to write using
Structured query language in Teradata
platform is dataware house
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.
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