Click here to Skip to main content
15,920,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi can anyone help with a quire to retrieve both numeric and alpha numeric entries from a column.

Example: Column is 'ID' and entries could be = abc0000 or could be all 9999999999.

The search is a list of numeric and alphanumeric items.

Example: 8765398 ha34789 ss0487667 7629

I wish the result to show the full line for each alphanumeric and numeric search item.
Posted
Comments
CHill60 18-Feb-15 6:51am    
What have you tried? The column itself is obviously not numeric so just query it - what is the problem??
ZurdoDev 18-Feb-15 8:01am    
Where are you stuck?

Just do
SELECT *
FROM table

I don't see where you are stuck.

1 solution

You can use numeric values as alphanumeric in where clause.

SQL
select *
from table1
where ID IN ('8765398' , 'ha34789' , 'ss0487667','7629')
 
Share this answer
 
Comments
Member 11345747 18-Feb-15 8:33am    
John C Rayan thank you so much. The IN was the trick that made it work. You live and learn something everyday.
John C Rayan 18-Feb-15 8:51am    
I am glad that it helped you.
Member 11345747 18-Feb-15 8:35am    
Thank you to all that replied.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900