Re: [sqlite] if possible point another table

2014-04-04 Thread Simon Slavin
On 4 Apr 2014, at 7:55am, Darren Duncan wrote: > Putting that aside, for any SQL DBMS that supports the PREPARE and EXECUTE > keywords, you can have a SQL string value that contains a SQL statement and > execute it, and you can build that string in other SQL from your

Re: [sqlite] if possible point another table

2014-04-03 Thread Darren Duncan
On 2014-04-03, 7:19 PM, Andy Goth wrote: I don't believe this can be done in pure SQL since table names are not values. That doesn't mean it can't be done, though you will have to put some of the logic in your program itself. I expect that in the future this limitation will no longer exist.

Re: [sqlite] if possible point another table

2014-04-03 Thread mm.w
refactoring the model using views might be an option too. On Thu, Apr 3, 2014 at 9:50 PM, mm.w <0xcafef...@gmail.com> wrote: > Hello, > > yep; else; it would require an "eval" or the support to sql scripting, as > none of this exists, it has to be done at the program level; in a regular > two

Re: [sqlite] if possible point another table

2014-04-03 Thread mm.w
Hello, yep; else; it would require an "eval" or the support to sql scripting, as none of this exists, it has to be done at the program level; in a regular two queries run, nothing fancy or extraordinary. Best. On Thu, Apr 3, 2014 at 9:13 PM, Andy Goth wrote: > On

Re: [sqlite] if possible point another table

2014-04-03 Thread Andy Goth
On 4/3/2014 10:10 PM, Keith Medcalf wrote: select * from k1 union select * from k2; My understanding of the question was, how to select from tables whose names are somehow computed or extracted from another table -- Andy Goth | ___

Re: [sqlite] if possible point another table

2014-04-03 Thread Andy Goth
On 4/3/2014 8:46 PM, YAN HONG YE wrote: I have a table named aa like this: id pid namenotetablename 1 0 s12 bbc k1 2 1 sss vac k2 another table named k1: id pid namenote 11 1 f2 aaa 12 1 fs

[sqlite] if possible point another table

2014-04-03 Thread YAN HONG YE
I have a table named aa like this: id pid namenotetablename 1 0 s12 bbc k1 2 1 sss vac k2 another table named k1: id pid namenote 11 1 f2 aaa 12 1 fs bbc another table named k2: id