July 28, 2005 at 10:03 am
select *,
case when contractretd = 0 then '-Terms & Conditions' else '' end TC,
case when letterretd = 0 then '-Offer Leter' else '' end let,
case when scheduleretd = 0 then '-Teaching Schedule' else '' end sc,
case when tc = '-Terms & Conditions'then [tc]+[let]+[sc]end ng
from chase_letter_bd_vw
July 28, 2005 at 10:03 am
could you please post the query ?!
**ASCII stupid question, get a stupid ANSI !!!**
July 28, 2005 at 10:18 am
oh - you're trying to concatenate the aliases....TC, let etc...that won't work...
don't have test data to test but try this:
select *,
case when contractretd = 0 then '-Terms & Conditions' else '' end TC,
case when letterretd = 0 then '-Offer Leter' else '' end let,
case when scheduleretd = 0 then '-Teaching Schedule' else '' end sc,
case when ((contractretd = 0) and (letterretd = 0) and (scheduleretd = 0)) then
'-Terms & Conditions -Offer Leter -Teaching Schedule' else '' end ng
from chase_letter_bd_vw
**ASCII stupid question, get a stupid ANSI !!!**
Viewing 3 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply