Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

wildcard search for numeric values using select ?

former_member31961
Contributor
0 Likes
592

Hi,

I want do wildcard search for numeric fields of the table.

For charcter/string i have used - select * from XX_TABLE where param1 like 'SS%'. But this query doesnt work when para1 is numeric. Please let me know first whether this is possible ? if yes how to achieve it ?

Thanks in advance,

Shrinivas

3 REPLIES 3
Read only

JackGraus
Active Contributor
0 Likes
484

Numeric fields can not be like 'SS' so i think you want to select something like '66' ? For that youw might use something like 'where param1 between 660000 and 669999'.

regards Jack

Read only

0 Likes
484

Hi Jack,

The numeric field is of 8 digits, so when i give search critera as '66', it should return values 66000000, 660000, 6600 etc. so i was not able to give between some range. I also tried storing all these values in internal table and the segregate the values it contains '66*'. This worked well but requires lot of coding effort.Please suggest if you guys have any better method ?

Thanks,

Shrinivas

Read only

Former Member
0 Likes
484

Hi,

Try this option.

select * from XX_TABLE where param1+0(2) = 'SS'.

- Selva