parentheses within string break value()
Bob Sneidar
bobsneidar at iotecdigital.com
Tue Oct 27 11:54:32 EDT 2015
What I typically do is:
put "SELECT foo FROM tTableName WHERE (bar > 7) AND (animal<>'cat');" into tSQL
replace "tTableName" with tTableName in tSQL -- assuming tTableName contains the name of a real table
Looks and reads a whole lot cleaner.
Bob S
On Oct 26, 2015, at 13:25 , Dr. Hawkins <dochawk at gmail.com<mailto:dochawk at gmail.com>> wrote:
I seem to have mis-parsed that myself.
There is a custom property (call it theProp) with a value like
"SELECT foo FROM " & tableName & " WHERE (bar > 7) AND (animal<>'cat');"
So those quotes and & are in the string to be evaluated.
My understanding of parsing is that the first piece should evaluate to
SELECT foo FROM
the second to
SELECT foo FROM
and the third to
WHERE (bar > 7) AND (animal<>'cat');
and when concatenated produce a string of
SELECT foo FROM theRealTableName WHERE (bar > 7) AND (animal<>'cat');
More information about the use-livecode
mailing list