Thanks, James, but John Gordon identified my usage error so I'm good
to go now.
On Mon, 14 May 2012 09:28:06 -0700 (PDT), james hedley
wrote:
>On Monday, 14 May 2012 17:01:49 UTC+1, Steve Sawyer wrote:
>> Brand-new to Python (that's a warning, folks)
>>
>> Trying to write a routine to import a
On Monday, 14 May 2012 17:01:49 UTC+1, Steve Sawyer wrote:
> Brand-new to Python (that's a warning, folks)
>
> Trying to write a routine to import a CSV file into a SQL Server
> table. To ensure that I convert the data from the CSV appropriately,
> I"m executing a query that gives me the schema (
On Tue, May 15, 2012 at 5:09 AM, Steve Sawyer wrote:
> Thanks - now, given my query that returns the table structure, this
> works fine:
>
> table_dict = {}
> table_specs = cursor.execute(query_string)
> for row in table_specs:
> row_dict = {}
> row_dict['type'] = row.DataType
>
Thanks, John.
>What are you trying that isn't working?
Typical newbie trick - trying to make things more complicated than
they are. I didn't realize that syntax would establish the key/value
pairs of the dictionary - I thought that would only allow you to
establish the value to correspond to a spe
In Steve Sawyer
writes:
> What I think I want to do is to construct a dictionary using the
> column names as the index value, and a list containing the various
> attributes (data type, lenghth, precision).
If you're using just the column name as the dictionary key, make sure
there are no dupli
Steve Sawyer wrote:
Brand-new to Python (that's a warning, folks)
Trying to write a routine to import a CSV file into a SQL Server
table. To ensure that I convert the data from the CSV appropriately,
I"m executing a query that gives me the schema (data column names,
data types and sizes) from th
On Tue, May 15, 2012 at 2:01 AM, Steve Sawyer wrote:
> Brand-new to Python (that's a warning, folks)
It's one we're familiar with :) Welcome!
> Trying to write a routine to import a CSV file into a SQL Server
> table. To ensure that I convert the data from the CSV appropriately,
> I"m executing
Brand-new to Python (that's a warning, folks)
Trying to write a routine to import a CSV file into a SQL Server
table. To ensure that I convert the data from the CSV appropriately,
I"m executing a query that gives me the schema (data column names,
data types and sizes) from the target table.
What
I started to use dbschema.com but it has some big flaws (mainly
regarding keys and mysql) and besides it's being in java (wich i don't
like to code at all) it's closed source.
I'm considering starting a new GPL one in python, so, i ask if you
people already know a project like that.
Thanks,
Gabri