SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to check in all rows and column of the table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cplusplus
Aged Yak Warrior

536 Posts

Posted - 05/03/2013 :  12:04:54  Show Profile  Reply with Quote
Is it possible to check in all rows and columns on a table for this string:'BSYRRVP'
select * from AL_PARENT_CHILD


Thanks for the helpful info.

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1052 Posts

Posted - 05/03/2013 :  12:30:08  Show Profile  Reply with Quote
There might be even better ways of searching it but here it goes a possible one :)

SELECT * from Table
WHERE Col1+' '+Col2+' '+Col3+...' '+ColN Like '%BSYRRVP%'

Note: Columns in Where conidtion should only be of string datatypes.

Cheers
MIK
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000