Home > database >  In Oracle zhongjian tabulated in Python identifier for too long error
In Oracle zhongjian tabulated in Python identifier for too long error

Time:09-21

Def insert_ods_sc (odskettle) :
Conn=sc_conn ()
Try:
Cursor=conn. Cursor ()
Insert_query="INSERT INTO BIPAY. BI_SYNC_TABLES_V2_N VALUES (: 1, 2, 3,, 4,, 5, 6,, 7, 8, : 9:10, :, 11, 12,,, 13, 14, : 15,,, 16, 17, : 18, :, 19, 20, :, 21, 22) '
If len (odskettle)!=0:
For I in range (len (odskettle) :
Id=odskettle. Ix [I, 0]
Title=odskettle. Ix [I, 1)
Schedule_type=odskettle. Ix [I, 2)
Status=odskettle. Ix [I, 3)
Db_type=odskettle. Ix [I, 4)
Data_source=odskettle. Ix [5] I,
S_schema=odskettle. Ix [6] I,
S_table_name=odskettle. Ix [7] I,
T_schema=odskettle. Ix [8] I,
T_table_name=odskettle. Ix [9] I,
T_wrk_schema=odskettle. Ix [10] I,
T_get_max_sql=odskettle. Ix [11] I,
Flg_truncate_table=odskettle. Ix [12] I,
S_sql=odskettle. Ix [13] I,
T_before_sql=odskettle. Ix [14] I,
T_after_sql=odskettle. Ix [15] I,
Success_mail=odskettle. Ix [16] I,
Create_dt=odskettle. Ix [17] I,
Created_by=odskettle. Ix [18] I,
Customer_var=odskettle. Ix [19] I,
Sync_type=odskettle. Ix [20] I,
Create_sql=STR (odskettle. Ix [I, 21])
Print create_sql
Params=[schedule_type id, title, status, db_type, data_source, s_schema, s_table_name, t_schema, t_table_name, t_wrk_schema, t_get_max_sql,
Flg_truncate_table s_sql, t_before_sql t_after_sql, success_mail, create_dt, created_by, customer_var, sync_type create_sql]
Cursor. The execute (' "" "' + create_sql + '" ""')
MIT ()
conn.comCursor. The close ()
Print "ODSKETTLE FINISH!"
The else:
Print "NO NEW DW_JOB!"
Except cx_Oracle. DatabaseError as MSG:
Print (MSG)
Finally:
Pass
Execution of Python code,
Create_sql storage built predicate sentence is
The create table K_TRADE_ODS. PAYM_TB_BIZ_PRODUCT_MAP
(
Biz_product_code VARCHAR2 (32) not null,
Product_code that starts VARCHAR2 (32) not null,
Enable_flag CHAR (1) not null,
Memo VARCHAR2 (512),
Gmt_create DATE not null,
Gmt_modify DATE not null,
Buyer_account_type VARCHAR2 (50),
Seller_account_type VARCHAR2 (50),
The extension VARCHAR2 (128)
)
An error message is
ORA - 00972: the long identifiers
God help me solve the

CodePudding user response:

Should be to make the "K_TRADE_ODS. PAYM_TB_BIZ_PRODUCT_MAP" the whole as a table name, and suggested to try not to use the user name, if it is for this reason to look for a solution

CodePudding user response:

Can't get rid of or at the wrong

CodePudding user response:

Oracle table name the longest 30 characters, the 36 characters, suggest the name of the table,

CodePudding user response:

How did you find out to 36 characters,,,, @ can lele can

CodePudding user response:

Have K_TRADE_ODS this user?
Create_sql storage building behind the table statements should be combined with a semicolon?
'" ""' + create_sql + '" ""' attention check before and after the statement of the lack of space?

CodePudding user response:

The
reference 4 floor scy1993 reply:
how did you find out to 36 characters,,,, @ can lele can

 select length (' K_TRADE_ODS. PAYM_TB_BIZ_PRODUCT_MAP) from dual; 

35 characters, 36 characters is the copy with the blank space
  • Related