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

[sqr-users] Re: Passing a Variable Value as an Expression String to DECODE(), is it possible?



Saffiula,

First, do put some debugging show statements in to be sure you're getting 
what you expect in your variable.

You shouldn't need to use dynamic SQR (square brackets); simple 
substitution should work.

Remember though, that this substitution is done ONCE, before the select 
starts.  Sometimes newbies try to do this:

begin-select

abbreviation    &code
max (decode(bl.abbreviation, TRIM(&code),'Y',bl.abbreviation,'N'))  (,+5)

from bl

etc

and this will not work.

Maybe you should show us more of the select statement, and the loop if it 
is outside the select.

Also, as usual, if you have any local procedures, make sure you have 
indicated $_global-variables correctly.

Dave


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users