[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Conditional selects



Hi
In SQR it is possible to make a conditional select by passing in a variable into the where clause:
e.g.
...
...
let $selectedValue = 'valueSelected'
begin-select
field1
field2
field3
...
from tablename where field2 =  $selectedValue
end-select
...
 
                        ***************************************************************
However, I need to select on whether field1 is null or field1 is equal to a particular value
i.e,
...
let $selectedValue = 'valueSelected'
begin-select
field1
field2
field3
...
from tablename where     field2 is null
                                     field2 = $selectedValue
end-select
...
 
Somehow, I think that it should be possible to pass in a string/string literal...
        ...but so far I have drawn a blank...
 
Am I chasing moonbeams?
Is it possible? Or am I wasting my time?
 
Thanks.
 
Andrew
********