On 06/25/2017 12:44 PM, Tahir Hafiz wrote:
> Thanks Alan and Peter,
>
> Alan you are right this could be solved via an SQL statement but I was
> asked to finish the python script.
> Anyways, this worked and helped to solve the problem in the end:
>
> # Create iterator object, dictionary which can
On Jun 25, 2017 12:05 PM, "Danny Yoo" wrote:
As the other tutors have suggested, look into doing the SQL updates
directly, rather than format strings of SQL commands.
Ah, here's a good resource:
http://bobby-tables.com
Just to emphasize: the reason I'm pointing this out is to try to
counterba
As the other tutors have suggested, look into doing the SQL updates
directly, rather than format strings of SQL commands.
A major reason is because strings do not natively support the
representation of nested, grammatical things like sentences or SQL
commands. It's really easy to write a string f
Thanks Alan and Peter,
Alan you are right this could be solved via an SQL statement but I was
asked to finish the python script.
Anyways, this worked and helped to solve the problem in the end:
# Create iterator object, dictionary which can be used to iterate against.
b_iter = iter(new_emails)
On 21/06/17 21:26, Tahir Hafiz wrote:
> My python skills are limited but I have managed to generate a couple
> of lists using python and the psycopg2 library by querying a postgress
> table and it's columns.
You say your python skills are limited but how about your SQL skills?
The reason I ask is
Tahir Hafiz wrote:
> Hi All,
>
> My python skills are limited but I have managed to generate a couple
> of lists using python and the psycopg2 library by querying a postgress
> table and it's columns.
> I would like to use the two generated lists from the python script to
> create a file called u
Hi All,
My python skills are limited but I have managed to generate a couple
of lists using python and the psycopg2 library by querying a postgress
table and it's columns.
I would like to use the two generated lists from the python script to
create a file called upgrade_email_addresses.sql (and th