Link to home
Start Free TrialLog in
Avatar of PratikShah111
PratikShah111

asked on

insert statement in Python

Disclaimer : I am writing my first Python script so please do not laugh at my questions : )

I want to write an insert statement and here is what i have. if someone can show me correct syntax

with open('somefile.csv') as csvfile:
    readCSV = csv.reader(csvfile, delimiter='|')
    for row in readCSV:
        print(row[0],row[1],row[3].strip("0"),row[15],row[32])


insert into table1 (Column1, Column2, Column3, Column4) Values ( I need values from these variables row[0],row[1],row[3].strip("0"),row[15],row[32])
Avatar of Norie
Norie

What data types are Column1, Column2, Column3 and Column4?
ASKER CERTIFIED SOLUTION
Avatar of gelonida
gelonida
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi @PratikShah111
Everything OK?
We would need your feedback in order to know how we can best help.