General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
I think you're misunderstanding my question. I know that [] can be used as string delimiters and I have a pretty good handle on macro expansion. (At least normally, I do. Right now I'm exhausted and basic syntax is getting me muddled) What I didn't understand is why you gave two ways of doing what I want; one with the delimiters, one without. IOW, what advantage does:
SET FILTER TO custno = [&lccustno]
have over
SET FILTER TO custno = &lccustno
The reason I want to know is because I tried the second one before I asked the question and it didn't work. I'm thinking it's because it interpreted the value of lccustno as being a variable name since there were no quotes, so the first one should work better.
Thanks,
Michelle
>[] can be used as string delimiters, like '' or ""; since they're less likely to occur in most string expressions, they're a safer choice for making a literal. String literals must be quote-encapsulated, so that means "string", 'string' or [string] is needed to make the literal. I find the last less subject to a stray delimiter in the string, for example, if you use the single quote, the macro expansion causes an error with the following example:
>
>
>lcCustName = "Pinhead Ed"
>SET FILTER TO custname = '&lcCustName' && seems to work
>lcCustName = "O'Malley"
>SET FILTER TO custname = '&lcCustName' && whut did it dew?
>
>I hate to use your favorite FLA, but RTFM and look at what goes on in string expressions, literals, and macro-expansion.
>
>Numbers are not quote-encapsulated as literals. Macro-expansion requires a string to be specified for expansion.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only