Search Text and numer in One Query

Posted by NARAAYANAN under Sql Server on 6/21/2013 | Points: 10 | Views : 517 | Status : [Member] | Replies : 2
Hi All.
How can we search Text and Number in One Query?
In my Table , I have two column one is Customer id and Customer name . Customer Id is Integer field and Customer name is Varchar field. So How can we search text and number in one Query?

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/



Responses

Posted by: Niladri.Biswas on: 6/23/2013 [Member] Platinum | Points: 25

Up
0
Down
...
where [Customer Id ] = @CustId
And [Customer name ] = @CustName

Best Regards,
Niladri Biswas

NARAAYANAN, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kirthiga on: 6/24/2013 [Member] Starter | Points: 25

Up
0
Down
Hi Naraayanan,

By using logical operators in where clause we can search two different values

select * from TableName where [Customer id]=123 or [Customer name ] ='abc'


NARAAYANAN, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response