Hi,
I have a question regarding converting strings to number.
I have a table "A" which has 2 columns and values stored as following-
COL1 VARCHAR2(10)
COL2 VARCHAR2(20)
select * from A where ..
COl1 COl2
--- -----
parm1 abcd
parm2 1234,5678
I have another table "B" which has values from the COL2 column from table "A", but in the following format-
COL2 NUMBER(2)
select * from B
COL2
----
1234
5678
Now if I want to select from table "B" saying -
select * from B where COL2 in(select COL2 from A where COL1='parm1')
It does not return any rows since it takes '1234,5678' as a single string and is unable to find it in B.
Is there a way to sort of seperate 1234 and 5678 in table A and do a successful search for them in table B?
Thanks a lot
Rohan
I have a question regarding converting strings to number.
I have a table "A" which has 2 columns and values stored as following-
COL1 VARCHAR2(10)
COL2 VARCHAR2(20)
select * from A where ..
COl1 COl2
--- -----
parm1 abcd
parm2 1234,5678
I have another table "B" which has values from the COL2 column from table "A", but in the following format-
COL2 NUMBER(2)
select * from B
COL2
----
1234
5678
Now if I want to select from table "B" saying -
select * from B where COL2 in(select COL2 from A where COL1='parm1')
It does not return any rows since it takes '1234,5678' as a single string and is unable to find it in B.
Is there a way to sort of seperate 1234 and 5678 in table A and do a successful search for them in table B?
Thanks a lot
Rohan