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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Help with select

Author  Topic 

lucsky8
Posting Yak Master

105 Posts

Posted - 2008-06-03 : 08:29:14
Hi, i am using stored procedure with sql server 2005.

I have this table

tblReponse
intReponseId [autonumber]
strName
intT2
intT3

Here some data

1 Luc A B
2 Marc C D
3 John A
4 Kev A D
5 Pual A

I need to create a query that will take intT3 if there something in intT3 but if intT3 is empty take intT2 instead.

So for this data it will give me this:

B D A D A

Any idea thanks in advance!!




visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-03 : 08:33:54
duplicate post

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=104043
Go to Top of Page

lucsky8
Posting Yak Master

105 Posts

Posted - 2008-06-03 : 08:38:45
hi sorry can you delete this post tks in advance!
Sorry!
Go to Top of Page
   

- Advertisement -