Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Simple select query ??

Author  Topic 

yeoryuel
Starting Member

9 Posts

Posted - 2009-04-11 : 09:59:42
Am giving out the example straightaway....
i have two columns frstnm and lstnm and data are
Andrew || Symonds
Philip || Andrew
Galvin || Sobers
When i search for simply 'andrew', the query should return
Andrew Symonds and Philip Andrew.. Is it possible ?? Thanks...


Success Code:
"Impress Yourself"

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2009-04-11 : 10:11:32
[code]select
*
from
theTable
where
lstnm = 'andrew'
or frstnm = 'andrew[/code]If your server/table/column has case-sensitive collation, take care to use the correct capitalizations.
Go to Top of Page
   

- Advertisement -