Trying to use the following query in a Question Event generates an error:
SELECT CA_Districts_Senate.SenateMember AS DefaultValue FROM CA_Districts_ZipCodes INNER JOIN CA_Districts_Senate ON CA_Districts_ZipCodes.SenateDistrict = CA_Districts_Senate.SenateDistrict WHERE CA_Districts_ZipCodes.ZipCode = $(ZipCode)
Running a similar query from the Host SQL tab -- inserting a Zip Code instead of the Form variable -- works just fine.
Other forms which use a simple query without a JOIN also work just fine.
(I'll be converting the statement to a Stored Procedure once I get it working.)
Any suggestions? Thanks.
DNN 4.9.5
Dynamic Forms 3.4.5