Re: Case and no column

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 09/27/04


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!



Relevant Pages

  • Re: datagrid
    ... I don't want to display an empty string. ... Is there a way I can do this using datagrid. ... > Function CreateDataSource() As DataTable ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Buffer size when receiving data through a socket?
    ... tried sending an empty string from the server back to the client, and as expected it exited the loop and closed the client, which doesn't make sense to me, since an empty string could be perfectly valid return data. ...
    (comp.lang.python)
  • Re: Required Field
    ... This will check for Null and an empty string. ... > MsgBox "Missing Client Name", vbCritical, msgTitle ... >not erased the data after entering it once they get the error message. ...
    (microsoft.public.access.formscoding)
  • Re: Buffer size when receiving data through a socket?
    ... Pressing just ENTER will ... exit the loop and close the client socket. ... since an empty string could be perfectly valid return data. ...
    (comp.lang.python)
  • Re: Help with naming elements in a loop
    ... I am unsure if the empty string is a valid value for display. ... Assigning an empty string is in fact a useful facility where specific ... elements have various values depending on the browser. ...
    (comp.lang.javascript)