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
 CASE inquiry

Author  Topic 

Aki
Starting Member

4 Posts

Posted - 2010-06-14 : 23:17:19
Hi, may inquire what 15 and 25 meant in the case stmts below in a SELECT clause?
Thanks.

1.
case when TYPE = 88 then 'A'
when TYPE = 99 then 'B' else '' end
, 15) AS TRANTYPE

2.
case when TYPE = 88 then 'A'
when TYPE = 99 then 'B' else '' end
, 25) AS TRANTYPE

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-06-15 : 02:12:41
Can you post the full select statement?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2010-06-15 : 03:11:55
The ", 15)" is a part of an outer statement...the full statement might look something like this (doesn't make a whole lotta sense but it's just for illustration purposes):

LEFT(case when TYPE = 88 then 'A' when TYPE = 99 then 'B' else '' end, 15)

- Lumbago

My blog (yes, I have a blog now! just not that much content yet)
-> www.thefirstsql.com
Go to Top of Page
   

- Advertisement -