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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Need column name in Status column
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 06/19/2013 :  11:54:05  Show Profile  Reply with Quote
Hi All,

I need to write a code in SQL Server in which I have 4 columns(First Name (2 columns) and Last Name (2 columns)).I have a 5th column name 'Status'.I have set a condition that if value in 1st and 3rd column [First Name]and 2nd & 4th column [Last Name] matches the status is shown TRUE else FALSE.But now I have been told to write Column name even if the data is matching or if it has discrepancy, instead TRUE or FALSE.

Can anyone guide me regarding this?

I am just a beginner in this field.

Flowing Fount of Yak Knowledge

1054 Posts

Posted - 06/19/2013 :  12:01:14  Show Profile  Reply with Quote
Can you illustrate the issue with the help of an example? by providing sample data in consumable format and the expected output?

Go to Top of Page
  Previous Topic Topic Next 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.02 seconds. Powered By: Snitz Forums 2000