I'm not thinking big picture here. I just want this one view. I am not
planning on using it in other queries, I just don't want to have to
either group lots of data together or parse data apart in all of my
projects that will be using these tables. I suppose that is what I will
be doing though. It's not a big deal - I was just wondering if a simpler
solution was available. 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nicolas Williams
Sent: Wednesday, July 09, 2008 2:41 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] View with Dynamic Fields ?

On Wed, Jul 09, 2008 at 12:32:27PM -0700, Andrea Connell wrote:
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Cote
> > 
> > Andrea Connell wrote:
> > > I am still holding a shred of hope for a trigger that can recreate

> > > the view whenever the questions table is modified
> > 
> > I wouldn't hold much hope for that. Triggers can only execute 
> > insert, update, delete, or select SQL statements. There is no way to

> > execute a create table or create view command.
> 
>  Really? I never knew about that restriction before. Well, okay then.
> Everybody is telling me it is impossible, and that's kind of what I 
> was thinking coming in to this so I guess that's that. Thanks!

It's not just that it's impossible.  Imagine you develop a dynamic SQL
extension to SQLite (or any other open source SQL engine).  Then what?
How do you use the results of SQL queries with dynamic column counts in
larger SQL queries?  That's the hard part here.

If you want "dynamic" column counts only for display purposes then you
avoid that hard problem.  But then, you might as well use
group_concat() to get what you want, rather than work on extending the
engine to support some notion of dynamic SQL.

Nico
--
_______________________________________________
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