To be fair, I asked a theoritical question and created a very simple example for it. The real situation involves choosing dynamically from which view to select. I have very complicated db logic. I ended up asking the application developer to do just what you suggesting: implement a little piece of code to choose which of my views to query. However, due to specifics of the situation (rather than best technical solution), I strongly prefer implementing any logic myself (and I can only do it in sqlite). But thanks a lot for the advice!
On Wed, May 11, 2011 at 10:11 PM, Nico Williams <n...@cryptonector.com>wrote: > On Wed, May 11, 2011 at 9:03 PM, John <tauru...@gmail.com> wrote: > > Yes, I could. But considering that I'm applying tons of logic and not > just > > selected this would be a real mess. Not even sure I could pull it. > > Normalization was something I lacked with regard to previous post. But in > > this case, I don't think it has anything to do with it. It's just alack > of > > dynamic sql. I can't trully construct sql statement piece by piece with > SQL > > db as I did with Oracle. Just wanted to confirm. > > Whenever your instinct is that you need dynamic SQL, it's likely > wrong. Of course, in cases like this the lack of dynamic SQL may mean > that you end up with very verbose SQL, but hey. I have written SQL to > generate SQL, but when I do that I usually do it for the purpose of > generating views and triggers, which I then execute from the > application. > > Nico > -- > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- ~John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users