Subject Error with > 10 columns in SQL SELECT query using python firebirdsql
Author

Hi,

 

I am querying a Firebird 1.5.3 database with python code using the python firebirdsql module. All works well (query returns values as expected) with up to 10 columns from two tables, but when I add an 11th column I get the error:

“NameError: global name ‘INFO_SQL_SELECT_DESCRIBE_VARS’ is not defined” from the SQL execute statement. If I remove any one of the 11 columns from the query it works so it doesn’t appear related to a bad column name.

 

The database is not one I created, so I don’t know if the creator did something to lock it down in some way, or if Firebird is even able to do this.

 

My SQL query is as follows …

 

strquery="SELECT t.measured_datetime , t.results_dose, t.results_axsym, t.results_trsym, \

                t.results_qaflat, t.signature, t.set_key, d.beam_on_time, \

                d.d24_counts, d.d34_counts, d.d44_counts \

                FROM dqa3_trend t \

                JOIN tomo_data d ON (t.data_key = d.data_key) \

                WHERE extract (month from t.measured_datetime) = extract (month from CURRENT_DATE) \

                AND extract (year from t.measured_datetime) = extract (year from CURRENT_DATE) \

                AND (t.set_key=25 OR t.set_key=26)"

 

Any suggestions as to what might be causing this observed behaviour?

 

In appreciation,

Gary