At 02:19 PM 3/21/2014, Alastair Burr wrote:
Do I remember something about defaulting to TEXT for some reason and the parens forced an integer?
Alastair, Putting parentheses is helpful when comparing to a NULL value. Here's an practical exercise that you can try to understand the difference. CONNECT RRBYW18 SET VAR v1 INTEGER = NULL BROWSE ALL FROM Customer WHERE CustID = .v1 Notice the -ERROR- Missing right side of comparison. (2295) Now try the following: BROWSE ALL FROM Customer WHERE CustID = (.v1) This time you will get the correct message as follows: <WARNING> No rows exist or satisfy the specified clause. (2059) In addition, related to using parentheses ... R:BASE optimizer compares all the factors and selects the "best" index. To force the R:BASE optimizer to use a particular index, make other index columns in the WHERE clause compare to expression by putting parentheses around the comparison value. For example, putting parentheses around the variable var1 compares indexcol1 to an expression; indexcol2 is used by the R:BASE optimizer as the indexed column. WHERE indexcol1 = (.var1) AND indexcol2 = .var2 That is your tip of the day! Very Best R:egards, Razzak www.rbase.com www.facebook.com/rbase -- 31 years of continuous innovation! 16 Years of R:BASE Technologies, Inc. making R:BASE what it is today! --

