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

Reply via email to