I have an issue which I am not sure where the root cause is:
I use python cx_Oracle to connect to an Oracle DB.
cursor.fetchall() returns me records in this format [(4352,)]
I want to retrieve the '4352' so i proceed to do this: pk = cursor.fetchall()[0][0]
However i get: IndexError: list index out of range
I am not sure what I am doing wrong since when i manually create this return object on my python console as such: item = [(4352,)], I can retrieve the '4352' by calling item[0][0]
Thanks
Are you sure about the list returned by the fetchall() statement?
It looks like the resulting list is empty.
cursor.fetchall() throws index out or range error