Re: [Tutor] How to create a sqlite table schema dynamically

2014-03-20 Thread Alan Gauld
On 20/03/14 22:39, Toni Fuente wrote: I would expect your table to have only 3 columns: week, Name, quantity. You then run your report with something like select name, count from os where week == '15' Aha, and then produce the report in the way, that I am trying to build the table? Week, R

Re: [Tutor] How to create a sqlite table schema dynamically

2014-03-20 Thread Toni Fuente
* Alan Gauld [2014-03-20 19:27:57 +]: > On 20/03/14 17:31, Toni Fuente wrote: > > >I got a database from where I get the data that I am going to process, > >and create a dictionary osDict. This dictionary has the form of: > > > >osDict = {'CentOS v4.x': 10, 'Linux OS': 5, 'Redhat Enterprise

Re: [Tutor] How to create a sqlite table schema dynamically

2014-03-20 Thread Peter Otten
Alan Gauld wrote: > I confess I'm still not clear on your schema. What should the populated > table(s) look like? It all feels very un-SQL like to me. I'll make a bold guess that he wants to make a pivot table, something that is indeed not supported by sqlite. E. g., start with week | os

Re: [Tutor] How to create a sqlite table schema dynamically

2014-03-20 Thread Alan Gauld
On 20/03/14 17:31, Toni Fuente wrote: I got a database from where I get the data that I am going to process, and create a dictionary osDict. This dictionary has the form of: osDict = {'CentOS v4.x': 10, 'Linux OS': 5, 'Redhat Enterprise 4': 7} I want to create a weekly report in form of a csv

Re: [Tutor] How to create a sqlite table schema dynamically

2014-03-20 Thread Toni Fuente
* bob gailer [2014-03-20 11:38:47 -0400]: > On 3/19/2014 8:19 AM, Toni Fuente wrote: > >Hello everyone, > > > >I am stack with a problem that I can't find a solution: > > > >I need to create a sqlite schema dynamically, I've got a dictionary with > >text keys: "RedHat", "CentOS", "SLES9",..., "et

Re: [Tutor] How to create a sqlite table schema dynamically

2014-03-20 Thread bob gailer
On 3/19/2014 8:19 AM, Toni Fuente wrote: Hello everyone, I am stack with a problem that I can't find a solution: I need to create a sqlite schema dynamically, I've got a dictionary with text keys: "RedHat", "CentOS", "SLES9",..., "etc", "etc" My intention was at the time of creating the table

Re: [Tutor] How to create a sqlite table schema dynamically

2014-03-20 Thread Toni Fuente
* Mark Lawrence [2014-03-19 15:54:27 +]: > On 19/03/2014 12:19, Toni Fuente wrote: > >Hello everyone, > > > >I am stack with a problem that I can't find a solution: > > > >I need to create a sqlite schema dynamically, I've got a dictionary with > >text keys: "RedHat", "CentOS", "SLES9",..., "

Re: [Tutor] How to create a sqlite table schema dynamically

2014-03-19 Thread Mark Lawrence
On 19/03/2014 12:19, Toni Fuente wrote: Hello everyone, I am stack with a problem that I can't find a solution: I need to create a sqlite schema dynamically, I've got a dictionary with text keys: "RedHat", "CentOS", "SLES9",..., "etc", "etc" My intention was at the time of creating the table s

[Tutor] How to create a sqlite table schema dynamically

2014-03-19 Thread Toni Fuente
Hello everyone, I am stack with a problem that I can't find a solution: I need to create a sqlite schema dynamically, I've got a dictionary with text keys: "RedHat", "CentOS", "SLES9",..., "etc", "etc" My intention was at the time of creating the table schema run a loop through the dictionary ke