M
M
marselabdullin2020-10-26 12:38:50
Oracle
marselabdullin, 2020-10-26 12:38:50

ORA-00922 error while creating table?

I'm trying to create a simple table using python:

cur = con.cursor()

columns = 'i_id_pokaz varchar(50), \
pokaz_measure varchar(20), \
\"Описание показателя\" varchar(150), \
\"Блок данных\" varchar(30), \
level_name varchar(20), \
tb_id integer, \
gosb_id integer, \
org_id varchar(50), \
fact_amt integer, \
fc_amt_1 integer, \
rnk integer, \
plan_amt integer, \
period_begin date, \
period_end date, \
rep_date date, \
load date, \
execution, \'


cur.execute(f'create table from_cost_lab_with_love ({columns});')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-10-26
@marselabdullin

I think the problem is

\"Описание показателя\" varchar(150), \
\"Блок данных\" varchar(30), \

who told you that this is possible?
I think this would make more sense:
pokaz_descr varchar(150), \
data_block varchar(30), \

And other syntax should be checked all.
If you do not know the syntax, then create it in a database management program, and then copy the creation script.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question