user13653962 wrote:By using a case statement in your where clause like this:
how can i define the following condition in query definations tab to define query condition for the value which is linked from previous tab/report ,:P2_SR_BUSINESS_UNIT is the Item which are getting value from another report Value.
BUSINESS_UNIT=DECODE(:P2_SR_BUSINESS_UNIT,'BS&I','Business Sales And Information','WS','Whole Sale')
I am new in apex and havent had any chance to create a simple report.Version Application Express 4.1.1.00.23
select col1, col2 from my_table where case when :P2_SR_BUSINESS_UNIT = 'BS&I' and BUSINESS_UNIT='Business Sales And Information' then 1 when :P2_SR_BUSINESS_UNIT = 'WS' and BUSINESS_UNIT='Whole Sale' then 1 ELSE 0 END = 1
it is not not working if there is an Ampersand sign '&' , the same when i run like
case when :P2_SR_BUSINESS_UNIT = 'BS&I' then 'Business Sales And Information' else 'Others' ELSE END
in SQL we use set scan off to ignore '&' sign , how can we do the same in Apex.
SR_BUS_UNIT = case when 1 = 1 then 'Business Support and Improvement' else 'Others' End