Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Filter not working (Apex 4.0,win8,Oracle 10g )
Filter not working [message #627488] Wed, 12 November 2014 06:00 Go to next message
Xandot
Messages: 235
Registered: January 2014
Location: India
Senior Member
Hello,

I have one function which return CLOB variable that contains string and It displayed in interactive report, Data is shown properly but the filter on column is not working. what is the reason behind this problem function return CLOB variable.

My function looking like:-


create or replace FUNCTION  dummy
(a in NUMBER, b NUMBER)
return VARCHAR2
is
  l_temp varchar2(32767);  
begin
  l_temp  := '';
  for i in
      (select col1,col2
         from table1
         where col1 =a
         and col2 = b)
  loop
    l_temp   := l_temp  || i.col1 || ' (ID ' || i.col2 || '), ';
  end loop;
  return l_temp  ;
end;


Thanks,
Xandot
Re: Filter not working [message #627493 is a reply to message #627488] Wed, 12 November 2014 06:36 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Where is that function? This one returns VARCHAR2, not CLOB.
Re: Filter not working [message #627494 is a reply to message #627493] Wed, 12 November 2014 06:49 Go to previous messageGo to next message
Xandot
Messages: 235
Registered: January 2014
Location: India
Senior Member
I Apologies for wrong function.Below is the correct function:-

create or replace FUNCTION  dummy
(a in NUMBER, b NUMBER)
return clob
is
  l_temp clob;  
begin
  l_temp  := '';
  for i in
      (select col1,col2
         from table1
         where col1 =a
         and col2 = b)
  loop
    l_temp   := l_temp  || i.col1 || ' (ID ' || i.col2 || '), ';
  end loop;
  return l_temp  ;
end;
Re: Filter not working [message #627497 is a reply to message #627494] Wed, 12 November 2014 06:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

You do not return a real CLOB but a VARCHAR2, as I told you in SQL & PL/SQL forum for the same question.

Re: Filter not working [message #627501 is a reply to message #627497] Wed, 12 November 2014 07:43 Go to previous messageGo to next message
Xandot
Messages: 235
Registered: January 2014
Location: India
Senior Member
If I want to return a real CLOB than what are the step which I'll follow?
Re: Filter not working [message #627510 is a reply to message #627501] Wed, 12 November 2014 08:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

http://www.orafaq.com/forum/mv/msg/195227/627496/#msg_627496

Re: Filter not working [message #627517 is a reply to message #627510] Wed, 12 November 2014 08:55 Go to previous message
Xandot
Messages: 235
Registered: January 2014
Location: India
Senior Member
Thanks Michel.
Previous Topic: List of Values not assign
Next Topic: running pl/sql in apex.oracle
Goto Forum:
  


Current Time: Wed Dec 11 16:36:18 CST 2024