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 ])
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]
insert into table1 (Column1, Column2, Column3, Column4) Values ( I need values from these variables row[0],row[1],row[3].strip
What data types are Column1, Column2, Column3 and Column4?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi @PratikShah111
Everything OK?
We would need your feedback in order to know how we can best help.
Everything OK?
We would need your feedback in order to know how we can best help.