Home » Developer & Programmer » Forms » Split the data For Search (Oracle 9i, Form 6i)
Split the data For Search [message #435076] Mon, 14 December 2009 03:51 Go to next message
cvs_1984
Messages: 136
Registered: August 2007
Location: Punjab, INDIA
Senior Member

Hi,

I Required to Split Each Words in the sentence for search the data like that.
Ex:

 During the search of data for the following words,
 
   WELDING MACHINE

 it required to search the material name like WELDING MACHINE and 
MACHINE WELDING.






Regards,

C V S
Re: Split the data For Search [message #435078 is a reply to message #435076] Mon, 14 December 2009 03:55 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Set the criteria in PRE-QUERY trigger by using SET-BLOCK-PROPERTY built-in. You'd choose either DEFAULT_WHERE or ONETIME_WHERE. It would probably look like
where that_item = 'WELDING MACHINE' 
   or that_item = 'MACHINE WELDING'
Re: Split the data For Search [message #435084 is a reply to message #435078] Mon, 14 December 2009 04:09 Go to previous messageGo to next message
cvs_1984
Messages: 136
Registered: August 2007
Location: Punjab, INDIA
Senior Member

Hi,

The WELDING MACHINE is an example.

I required to split the words in a field with help of space between the sentences words.

Regards

C V S
Re: Split the data For Search [message #435093 is a reply to message #435084] Mon, 14 December 2009 04:29 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In that case, you should have put the question into the SQL & PL/SQL forum, not Forms one. Splitting a "sentence" into "words" is not a Forms problem.

Anyway: you'd use character functions, such as SUBSTR and INSTR to do that job. (Unfortunately, as you aren't on Oracle 10g or above, you can't use regular expressions.) Research their use, try to produce a query. If you don't succeed, come back, show what you have done, explain why it doesn't work and someone will take a look and provide further help.

In other words, I'm not in the mood to write that for you.
Previous Topic: Oracle Forms and Non-Profit
Next Topic: set_item_property - to Enabled False
Goto Forum:
  


Current Time: Fri Sep 20 04:54:50 CDT 2024