Feb-09-2019, 12:51 AM
Hi All
I am using below code to insert data into terdata table.
I am getting below error:
my code:
SCHEMA NAME : 'KLMD_SRM'
Please can one help me on this.
Thanks
I am using below code to insert data into terdata table.
I am getting below error:
Output:ProgrammingError: ('42000', "[42000] [Teradata][ODBC Teradata Driver][Teradata Database] Syntax error, expected something like '(' between the 'type' keyword and '='. (-3707) (SQLPrepare)")
During handling of the above exception, another exception occurred:
for each in df: df1= each[each.TRAN_STMT_DESC.str.contains("SUPERBOOK")] df1['TRAN_STMT_DESC']='SUPERBOOK' #total=df1.groupby(['TRAN_STMT_DESC']).sum() print(df1.head())Want to insert df1 data into table..
my code:
df1.to_sql(name='KLMD_SRM.PYTHON_LKP' ,con=conn_klm, if_exists='replace', index=False) my connection settings: td_userID = getpass.getpass('Enter User id') td_password = getpass.getpass('Enter pwd') conn_klm = pyodbc.connect('DSN=klm-LDAP;UID='+str(td_userID)+';PWD='+str(td_password)) del td_password, td_userID conn_klm conn_klm.autocommit = True curs = conn_klm.cursor()HERE MY TABLE NAME :'PYTHON_LKP'
SCHEMA NAME : 'KLMD_SRM'
Please can one help me on this.
Thanks