Good morning, I’m running a query to oracle database, however it returns list. So that I can make an insertion I need a variable of type integer or number, and the database returns an error: DatabaseError: ORA-01722: invalid number, because the type of variable is list. Below is the query:
${idUsername} = Query Select ID from sbr_collaborator where login like ${username}
How can i convert so that my database recognizes the variable?
I USED THE SET VARIABLE AND THEN USED A FULL TUPLE CONVERSION FUNCTION:
def converteTUPLA(vartupla):
res = functools.reduce(lambda sub, ele: sub * 10 + ele, vartupla)
return res