Zargo
Programmer
- Mar 21, 2005
- 109
Hi All,
I have a table with the following content:
TableB
ColumnA
1034%
2900%
3444%
10%
(the percent signs in the tables are wildcards)
I have a value 103459 (its a variable) and i want to check if this exists in the table; this value exists in the table because we have a value in the table 1034%. Our value begins also with 1034....
I want to return a 'x' if this exists in the table. The query should look like:
select 'x' from anytable where rownum = 1 and '103459' like (select
replace(columnA,'%','') from tableB)
But this doesnt work, anybody idea how to setup this query?
TIA,
Zargo
I have a table with the following content:
TableB
ColumnA
1034%
2900%
3444%
10%
(the percent signs in the tables are wildcards)
I have a value 103459 (its a variable) and i want to check if this exists in the table; this value exists in the table because we have a value in the table 1034%. Our value begins also with 1034....
I want to return a 'x' if this exists in the table. The query should look like:
select 'x' from anytable where rownum = 1 and '103459' like (select
replace(columnA,'%','') from tableB)
But this doesnt work, anybody idea how to setup this query?
TIA,
Zargo