Passing column name as a variable to a named query

This is the named query:
INSERT INTO a_stats.dock_door_induct_counts ({param1}) VALUES (:param2);

What happens if you drag the parameter into your query?

It doesnt look like A_Stats is defined anywhere. If this is the name of your project, then it should be within apostrophes or quotes

Wait. The problem is at the logger. Try: (str(params['param1']))

Or better yet, to see the entire dictionary: (str(params))

For future reference, the traceback tells you what line the script fails at.

1 Like

Ah Ha!!! ‘A_Stats’ worked. It is a wonderful day in the neighborhood.

Thank you all!!