Hello,
When the select statement contains only one column, the returned values contains "(' " and " ')," as prefix and suffix. Why? See my code below.
import kinterbasdb
# conect blah blah
cur = con.cursor()
cur.execute("select last_name from employee where emp_no < 50")
for (last_name) in cur:
print last_name
While this one runs perfectly as expected. (I added emp_no here)
cur = con.cursor()
cur.execute("select emp_no, last_name from employee where emp_no < 50")
for (emp_no, last_name) in cur:
print last_name
Thanks for any hints.
When the select statement contains only one column, the returned values contains "(' " and " ')," as prefix and suffix. Why? See my code below.
import kinterbasdb
# conect blah blah
cur = con.cursor()
cur.execute("select last_name from employee where emp_no < 50")
for (last_name) in cur:
print last_name
While this one runs perfectly as expected. (I added emp_no here)
cur = con.cursor()
cur.execute("select emp_no, last_name from employee where emp_no < 50")
for (emp_no, last_name) in cur:
print last_name
Thanks for any hints.