lexical reference in select clause [message #152671] |
Mon, 26 December 2005 04:36 |
srhl
Messages: 24 Registered: December 2005
|
Junior Member |
|
|
Urgent please.....
select &att1 name,&att2 id
from &table1
where &where
Lexical reference in the select as mentioned above is not working fine.
In after param trigger,
I want to give
If('some condn'=true) then
:att1='for query 1';
else
:att1 := 'for query 2';
end if;
is this possible?
Thanks in advance.
|
|
|
Re: lexical reference in select clause [message #153142 is a reply to message #152671] |
Thu, 29 December 2005 07:49 |
Steve Corey
Messages: 336 Registered: February 2005 Location: RI
|
Senior Member |
|
|
It is possible, your syntax is incorrect.
When assigning a value to a variable, you need to use the assignment operator.
IF X = TRUE THEN
att1 := 'For Query1';
ELSE
att1 := 'For Query2';
END IF;
Keep in mind that when building a report with lexical parameters like you have done, you need to assign default values to those parameters (if you go to object navigator and find your lexical params (data model->user parameters) and bring up their property palette, you need to make sure all lexicals have default values). The defaults should make use of all the columns you could use in the report. Make sure the lexical parameters have a large enough capacity to hold the data you want.
Good luck,
Steve
|
|
|