Re: Case and no column
From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 09/27/04
- Next message: Leszek Gruszka: "Re: Case and no column"
- Previous message: Leszek Gruszka: "Case and no column"
- In reply to: Leszek Gruszka: "Case and no column"
- Next in thread: Leszek Gruszka: "Re: Case and no column"
- Reply: Leszek Gruszka: "Re: Case and no column"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 27 Sep 2004 08:45:39 -0400
Leszek,
Columns cannot be dynamically omitted without using dynamic SQL... And
that's somewhat of a hack. The best choice is to set up your client to not
display the column if it's empty.
"Leszek Gruszka" <leszek.gruszka@kana.com.pl> wrote in message
news:eowRmrHpEHA.3464@TK2MSFTNGP14.phx.gbl...
> Hello!
> I used case method in my query. But there is one small thing very
> important for me.
> Here's my CASE code:
>
> SELECT Nazwastacji, Data,
> CASE
> WHEN ScRemoveOption = 'No Action'
> THEN ''
> ELSE 'Wrong parameter'
> END AS ScRemoveOption,
> CASE
> WHEN AuditBaseObjects = 'Disabled'
> THEN ''
> ELSE 'Parametr niezgodny'
> END AS AuditBaseObjects
> FROM KanaSecRep
>
> I made a compare beetwen "ScRemoveOption" column and 'No Action' value.
> It works. But if the parameter will be good (returning empty string), i
> want to omit showing this column and check next.
> How do this?
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
- Next message: Leszek Gruszka: "Re: Case and no column"
- Previous message: Leszek Gruszka: "Case and no column"
- In reply to: Leszek Gruszka: "Case and no column"
- Next in thread: Leszek Gruszka: "Re: Case and no column"
- Reply: Leszek Gruszka: "Re: Case and no column"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|