Home » Developer & Programmer » Forms » Concatenate '%' with textbox (Oracle Form Builder 10g, Win XP)
Concatenate '%' with textbox [message #506417] Mon, 09 May 2011 03:41 Go to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
I want to concatenate '%' with the textbox.

Actually, presently my program is searching for list number 1 to 5. but now the lists are increased and some sub lists are made. eg sub list of list 1 is 11, 12 , 13, 14 or more

Now it is working as getting the input value of the list then it can be display in the data block as a result search query. I want to make the textbox concatenate with '%' so whenever user put 1 in the field it shows all records present in list 1, 11, 12 ... till the list starts with 1.

I did check by changing the field like below

:block.variable := :block.variable||'%';


Also I changed the '=' with LIKE in query.

is there any solution for this??
Re: Concatenate '%' with textbox [message #506423 is a reply to message #506417] Mon, 09 May 2011 04:25 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Where/when do you want to concatenat % with item's value?

Where did you put that piece of code? Where did you substitute = with LIKE?

What happened when you did all of that? Obviously, you aren't satisfied with the result (otherwise, you wouldn't post the question).
Re: Concatenate '%' with textbox [message #506753 is a reply to message #506423] Wed, 11 May 2011 02:28 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
sorry for late reply. Actually, I had solved this so i did not bother to check who had replied. anyways i will tell you the problem again with the solution which i m working with.

Actually i want to concatenate % with the field which (a textbox) of the form so that user can execute the specific query. what i was doing before i just sending this
:block_name.field_name||'%';

but this gives some error. to cater this i took the other way. i create a simple function which done the same and it started working
get_all(:block_name.field_name);

the code of the program is below

get_all (input_fld VARCHAR2)
   RETURN VARCHAR2
IS
   temp   VARCHAR2 (20);
BEGIN
   temp := input_fld || '%';
   RETURN temp;
END;

Re: Concatenate '%' with textbox [message #506766 is a reply to message #506753] Wed, 11 May 2011 03:27 Go to previous message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
new_oracle2011 wrote on Wed, 11 May 2011 08:28
what i was doing before i just sending this
:block_name.field_name||'%';


Sending it where? What trigger is that code in?

new_oracle2011 wrote on Wed, 11 May 2011 08:28

but this gives some error.

What error?

You should not need that function at all.
Previous Topic: rupee font
Next Topic: webutil not working in solaries
Goto Forum:
  


Current Time: Sat Sep 07 15:13:10 CDT 2024