AnsweredAssumed Answered

ExecuteSQL noob, keep getting "?"

Question asked by jdevans on Jun 15, 2015
Latest reply on Jun 15, 2015 by philmodjunk

Title

ExecuteSQL noob, keep getting "?"

Post

I created an ExecuteSQL statement, and it works when I just create it right inside the data viewer. But when I copy that entire statement, and apply it to the calculation engine for a new field, all I get is "?". I have tried multiple ways of rewriting the ExecuteSQL statement, but to no avail.

I've tried adjusting whether or not the referenced TO and or fields are wrapped in quotes. I've tried renaming table occurrences to include no spaces. I'm not sure what the rules are on "Calculation Result" data type. For example if I define a new field, type Calculation, name it sql_test and then write:

SELECT date_field, number_field FROM table_ccurrence

What should I select as the "Calculation Result" in the Calculaton definition dialog? I have in the select statement a date field and a number field, so should the calculation result be text?

Outcomes