selecting a long column using % option -- how to ?? [message #374876] |
Mon, 09 July 2001 10:37 |
Ganesh
Messages: 31 Registered: November 2000
|
Member |
|
|
hi,
i have column in a table which has long datatype.
this column has details of record of another table with
fields of the record being pipe separated. how can select this column using like '%' option.
ex: long column has the following data ^DB_TS=11^BANK_ID=ABC^BAY_USER_ID=BCD^PWD=EQde10vKJk/iEkT3ISilkg^TXN_PWD=ZFBJ7zZ
If i select this with query,
select * from table_a where table_b_rec like 'B%';
It's giving me the following error.
ORA-00932: inconsistent datatypes
Is there any way out to select it.
TIA,
Ganesh.
|
|
|
Re: selecting a long column using % option -- how to ?? [message #374885 is a reply to message #374876] |
Mon, 09 July 2001 23:42 |
Sudhakar Atmakuru
Messages: 58 Registered: May 2001
|
Member |
|
|
Try it out with the usage of INSTR function.
SELECT * FROM TABLE_A WHERE INSTR(TABLE_B_REC,'%')>0;
It just returns all the rows those are having TABLE_B_REC column contained the '%' sign. The INSTR function finds an existence of specified character set in a speicific column/field and returns its position in the field.
HTH.
|
|
|