Apr-26-2018, 08:56 PM
Hello,
I have created a list of fields in the database. For example,
I tried 2 types of code:
Thank you.
I have created a list of fields in the database. For example,
varlist = ['id','grade','age','fname','lname','projTitle']How to use this list in the SQL command, instead of writing all the field names?
I tried 2 types of code:
sqlcommand = ("select (varlist) from table1") cur.execute(sqlcommand)
for fld in varlist: cur.execute("select fld from table1")The error message I get is: pypyodbc.DatabaseError: ('07002', '[07002] [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.')
Thank you.