Jump to content

Database Search Query To Return The Matching Column


Guest Andrew Buchan
 Share

Recommended Posts

Guest Andrew Buchan

I have an Application which queries multiple tables in a SQL Server 2005 Database.For example I have 3 tables, for simplicity sake lets say the tables are called t1, t2 and t3And in those tables I am checking columns for a given value, lets say the columns are called c1 and c2.So, I want to return an extra column/field that states the name of the column which contains the given search value.Is this possible in a query?

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...