Re: [sqlite] Column name as a variable

2014-11-20 Thread James K. Lowden
On Tue, 18 Nov 2014 12:06:02 + Simon Slavin wrote: > > my requirement, which is using a > > table name as a variable > > This is deliberately made very difficult in SQL. I think it's for > security reasons. That may be part of it, but It's really all about values.

Re: [sqlite] Column name as a variable

2014-11-18 Thread Paul Sanderson
It would have just been a nice elegant solution to a minor problem. Lots of other ways of skinning this cat. Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic

Re: [sqlite] Column name as a variable

2014-11-18 Thread Simon Slavin
On 18 Nov 2014, at 8:46am, Paul Sanderson wrote: > my requirement, which is using a > table name as a variable This is deliberately made very difficult in SQL. I think it's for security reasons. Simon. ___

Re: [sqlite] Column name as a variable

2014-11-18 Thread Paul Sanderson
om: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >>boun...@sqlite.org] On Behalf Of Paul Sanderson >>Sent: Monday, 17 November, 2014 03:55 >>To: General Discussion of SQLite Database >>Subject: [sqlite] Column name as a variable >> >>Is it possible to get a row c

Re: [sqlite] Column name as a variable

2014-11-17 Thread Keith Medcalf
qlite.org [mailto:sqlite-users- >boun...@sqlite.org] On Behalf Of Paul Sanderson >Sent: Monday, 17 November, 2014 03:55 >To: General Discussion of SQLite Database >Subject: [sqlite] Column name as a variable > >Is it possible to get a row count for each of the tables in a database

Re: [sqlite] Column name as a variable

2014-11-17 Thread James K. Lowden
On Mon, 17 Nov 2014 12:00:06 + Hick Gunter wrote: > SELECT table_name FROM sqlite_master; > > And then, in your programming language of choice, execute Or, with some determination, you can do it in two steps in pure SQL: Use SQL to produce SQL, and execute the result,

Re: [sqlite] Column name as a variable

2014-11-17 Thread Hick Gunter
...@gmail.com] Gesendet: Montag, 17. November 2014 11:55 An: General Discussion of SQLite Database Betreff: [sqlite] Column name as a variable Is it possible to get a row count for each of the tables in a database using a SQL query. i.e. is there a way I could use each row in sqlite_master and use

Re: [sqlite] Column name as a variable

2014-11-17 Thread Paul Sanderson
Thanks Simon I suspected as much - UNION is no good for me, it's easy enough to iterrate through in C. But not really what I was after. Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786

Re: [sqlite] Column name as a variable

2014-11-17 Thread Simon Slavin
On 17 Nov 2014, at 10:55am, Paul Sanderson wrote: > Is it possible to get a row count for each of the tables in a database > using a SQL query. > > i.e. > > is there a way I could use each row in sqlite_master and use > table_name to somehow do a select count(*)

[sqlite] Column name as a variable

2014-11-17 Thread Paul Sanderson
Is it possible to get a row count for each of the tables in a database using a SQL query. i.e. is there a way I could use each row in sqlite_master and use table_name to somehow do a select count(*) from sqlite.master.table_name Thanks Paul www.sandersonforensics.com skype: r3scue193 twitter: