December 22, 2015, 11:08 AM
Junaid[SOLVED]Field containing &
Need syntax help with this
WHERE INDEX_CODE CONTAINS 'S&P 500';
This keeps asking me INPUT P.
Please help this Novice user.
Thanks
This message has been edited. Last edited by: <Emily McAllister>, December 22, 2015, 11:22 AM
Prince JosephWebfocus is thinking that &P is an amper variable so it is looking for a value for it. One way to get around this is to do this:
-SET &P = '&' | 'P';
Hopefully that works.
December 22, 2015, 12:04 PM
SquatchThis might work also:
WHERE INDEX_CODE CONTAINS 'S&|P 500';
December 22, 2015, 01:08 PM
JunaidYes, both options worked.
Thanks guys.
December 22, 2015, 04:08 PM
WazFYI
I would characterise the pipe character like an escape character for the amper character, but is used after it.