Почему sql запрос неверен?
подскажите пожалуйста почему запрос неверен?
conn = sqlite3.connect('visa.db')
cursor = conn.cursor()
if cursor:
cursor.execute('CREATE TABLE IF NOT EXISTS visa_users_family_2 (member text, phone_code text, number text, email text, appoinment_date text, firstname text,lastname text, date_of_birth text, passport_issue_date text, passport_expiry_date text, passport_issue_place text,passport_number text,visa_type text,nationality text,type_passport text,firstname2 text,lastname2 text, date_of_birth2 text, passport_issue_date2 text, passport_expiry_date2 text, passport_issue_place2 text,passport_number2 text,visa_type2 text,nationality2 text,type_passport2 text')
cursor.execute('CREATE TABLE IF NOT EXISTS visa_users_family_2 (member text, phone_code text, number text, email text, appoinment_date text, firstname text,lastname text, date_of_birth text, passport_issue_date text, passport_expiry_date text, passport_issue_place text,passport_number text,visa_type text,nationality text,type_passport text,firstname2 text,lastname2 text, date_of_birth2 text, passport_issue_date2 text, passport_expiry_date2 text, passport_issue_place2 text,passport_number2 text,visa_type2 text,nationality2 text,type_passport2 text')
sqlite3.OperationalError: incomplete input
Ответы (1 шт):
Автор решения: Anatol
→ Ссылка
Пропущена скобка внутри запроса (на что, собсно, и намекает incomplete input).
cursor.execute('CREATE TABLE IF NOT EXISTS visa_users_family_2 (member text, phone_code text, number text, email text, appoinment_date text, firstname text,lastname text, date_of_birth text, passport_issue_date text, passport_expiry_date text, passport_issue_place text,passport_number text,visa_type text,nationality text,type_passport text,firstname2 text,lastname2 text, date_of_birth2 text, passport_issue_date2 text, passport_expiry_date2 text, passport_issue_place2 text,passport_number2 text,visa_type2 text,nationality2 text,type_passport2 text)')
А вообще, когда есть текст ошибки, гораздо проще загуглить, чем писать вопросы на СО.