Session variable problem : equality comparisons
ADBDec 10 2008 — edited Dec 11 2008I have defined the following session variable returning the error *"[nQSError: 10058] A general error has occurred. [nQSError: 42040] The session variable, NQ_SESSION.TEST, is defined as Row-Wise Initialization. It is restricted to usage with equality comparisons. (HY000)"*
select 'TEST', organisatie_nummer
from st_organisatie
where (select case when regio = -1 then 1 else
regio_nummer end
from st_gebruikers
where upper(gebruiker) = upper('VALUEOF(NQ_SESSION.USER)')) =
(select case when regio = -1 then '1' else regio end
from st_gebruikers
where upper(gebruiker) = upper('VALUEOF(NQ_SESSION.USER)'))
Why this setup...a user can have access to 1 region or 'ALL' region. To make the 'ALL' available a dummy records has been inserted with a value of -1.
There's no problem to retrieve the region (another session variable), it returns '%' in case a user has all regions or the region name itself.
But i wanted to use this variable to retrieve the organisations linked to a region, but using a like statement or the query above isn't possible as it always returns the same error.
Someone any idea how to resolve this?!
Txs,
Andy