Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for value across multiple columns 1

Status
Not open for further replies.

ousoonerjoe

Programmer
Joined
Jun 12, 2007
Messages
925
Location
US
Using SQL Server 2008.

We have some legacy accounting tables that contain Amt1, Amt2, Amt3,...Amt15. We need to search for a value across all 15 fields. Besides typing out all 15 variations, is there a simpler way to return all rows that contain the given value in any column of the table?


Thank you.

--------------------------------------------------
Bluto: What? Over? Did you say "over"? Nothing is over until we decide it is! Was it over when the Germans bombed Pearl Harbor? No!
Otter: Germans?
Boon: Forget it, he's rolling.
--------------------------------------------------
 
Thank you, Markros. That's exactly what i looking for.

--------------------------------------------------
Bluto: What? Over? Did you say "over"? Nothing is over until we decide it is! Was it over when the Germans bombed Pearl Harbor? No!
Otter: Germans?
Boon: Forget it, he's rolling.
--------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top