[postgis-users] Using string variables with PGScript
Bob.Bistrais at maine.gov
Wed Sep 23 14:26:32 PDT 2015
I am having trouble using a variable in a Select statement, using PGScript. I am trying to define a string variable, then use it in the Select statement. Something like this:
SET @MYSTRING = CAST(@REC['mycode'] AS STRING); -- at REC was set from a previous select
SELECT * from mytable where myfield = @MYSTRING;
-The variable is not quoted, so the select statement fails. How do I get the string variable to be enclosed in quotes?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users