create table AAA (NAME varchar2(30));
insert into AAA values ('Pelle T');
insert into AAA values ('Kalle S1000');
insert into AAA values ('Info missing');
insert into AAA values ('Pelle Svensson T3');
insert into AAA values ('Bad info');
select decode(name, 'Info missing',NAME,'Bad
For the final time Roland.
SQL select * from mytable;
FIELD1
Pelle T
No Info
Pelle Svensson T
Missing Info
Kalle S1000
SQL get lee.sql
1 SELECT field1, DECODE(field1,'No Info','No Info','Missing
Info','Missing Info',ltrim(substr(field1,1,instr(field1,' ')-1)))
Can you tell us what the last word in the field value mean (except 'Info
missing' and 'Bad info')
I mean is there a rule that those T, S1 does respect?
Something like this:
- first character is a letter and in this set of values ('S', 'T' etc)
- the rest are digits
etc.
Try to find out a
Thanks for all your repliesReally appreciate this..
next time I willtake more time to check the errors myself
Roland
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: [EMAIL PROTECTED]
Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051
select field1, decode(field1, 'Info missing', 'Info missing', 'Bad info',
'Bad info', substr(field1, 1, instr(translate(field1, '0123456789',
'@@'), '@')-3))
from your_table
HTH
Iulian
-Original Message-
Sent: Thursday, November 15, 2001 8:56 AM
To: Multiple recipients