Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 17856

I'm using Python to run a SQL query but I always have this error "ORA-01830"

$
0
0

I try to run this SQL Query using python, cx_oracle, but I recieve a ORA-01830 ERROR

splited_date = (fecha.year, fecha.month, fecha.day)print("flag {}{:02d}{:02d}".format(*splited_date))while flag == 1:    cursor = conn.cursor()      print(fecha.strftime('%Y-%m-%d'))    try:        print('Filling...')        formatted_date = fecha.strftime('%Y-%m-%d')        sql_query = "BEGIN PK_NAME(TO_DATE(:1, 'YYYY-MM-DD HH:MI')); END;"        cursor.execute(sql_query, [formatted_date])        print("table_proc")        flag = 2    except Exception as error:        print(error)        flag = 1print("Filling finished.")

Viewing all articles
Browse latest Browse all 17856

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>