> I'm operating at the user level in a java application.  The application
> allows me to run an SQL query, then it renders the output into HTML.

OK. Some third-party java application allows you to execute SQL query
and show you result as HTML. Then you take this HTML and show it to
somebody else? If not then it's not a big deal to just skip empty
columns with your eyes. If yes then you have to edit HTML as you wish.
I bet simple deleting of empty cells in the result table inside HTML
will not provide you the result you want...

We still don't see the whole picture of what you want to achieve. But
anyway there's no way you can include/exclude columns on SQL level so
you have to look for a way to get what you want at some higher level.

Pavel

On Thu, Dec 31, 2009 at 11:43 AM, nomorecaddy <nomoreca...@yahoo.com> wrote:
>
> I'm operating at the user level in a java application.  The application
> allows me to run an SQL query, then it renders the output into HTML.  I want
> to avoid showing empty colums in the HTML output, so I wanted the
> include/exclude column logic in my actual SQL statement.
>
>
>
>
> Pavel Ivanov-2 wrote:
>>
>>> I don't have access to that level of software, so that's the problem.
>>
>> You mean your experience with SQLite is based on using sqlite3 command
>> line utility only? If so you can just redirect its output to sed which
>> will do something like s/|\+/|/g.
>> If your experience with SQLite is based on using some other kind of
>> software then you cannot do anything with it - it will inevitably rely
>> on the fact that each row has the same number of columns and it will
>> show you all of these columns...
>>
>> In any case as you probably have understood already you better to tell
>> us what you're trying to achieve in general and what software you're
>> working with so that we could provide a better general advice that
>> doesn't involves such action as "removing columns without useful
>> information from result set"...
>>
>>
>> Pavel
>>
>> On Tue, Dec 29, 2009 at 4:34 PM, nomorecaddy <nomoreca...@yahoo.com>
>> wrote:
>>>
>>> I don't have access to that level of software, so that's the problem.
>>>  Thanks
>>> for your response - I like the power of select case, and was hoping that
>>> case could be applied in other areas as well.
>>>
>>>
>>>
>>> Simon Slavin-3 wrote:
>>>>
>>>>
>>>> On 29 Dec 2009, at 8:34pm, nomorecaddy wrote:
>>>>
>>>>> I'm looking for a SQL query that returns a variable number of
>>>>> columns.  Many of my columns contain NULL data, and I want to avoid
>>>>> showing
>>>>> the column altogether in that case.
>>>>
>>>> That is something that must be handled by your software.  There is no
>>>> way
>>>> in SQL to return an answer to a SELECT which has a different number of
>>>> columns in different records.  You could make SQL return columns with
>>>> NULL
>>>> in and your software could automatically recognise them and know not to
>>>> print them.
>>>>
>>>> Remember that SQL is a database engine.  It's job is to supply data.
>>>>  It's
>>>> your software's job to understand what needs to be done with it.
>>>>
>>>> Simon.
>>>> _______________________________________________
>>>> sqlite-users mailing list
>>>> sqlite-users@sqlite.org
>>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/selective-result-columns-tp26958131p26960765.html
>>> Sent from the SQLite mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/selective-result-columns-tp26958131p26980075.html
> Sent from the SQLite mailing list archive at Nabble.com.
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to