Who's Online
0 registered (), 3 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Recent Posts
Update EIT in SSHR
by Sahir
03:45 PM
End of Year Legislation Patch for 11i
by delboy
01:35 PM
Interfacing iRec and external sites
by DanC
11:42 PM
Capturing, Storing, & Paying Banked Overtime
by Paul
08:51 PM
Time and Labour & Oracle Projects
by Paul
07:34 PM
Search Engine Optimizers
by delboy
01:30 PM
Abseces in oracle hrms, super user: how to do I:
by JayTee
07:26 AM
Function for getting retropay-maintained balances
by CT
08/02/12 12:21 PM
Grade End Date
by Chris
03/02/12 10:46 AM
OLM Mandatory Enrolments
by bcooper
01/02/12 12:23 PM
Top Posters (30 Days)
CT 26
delboy 25
bcooper 15
Sahir 5
Gus 5
tovia123 4
Tim Bailey 3
christm 3
SBi 3
Simon_Mc 3
(Views)Popular Topics
Family Pack K issues thread 18216
CREATE_GRADE api returns:PLS-00306: wrong number o 13757
Still trying to locate... 12193
Creating hr jobs ORA-20001: HR_289477_JOB_GROUP_ID 10646
Viewing Output of another user 9131
HR_PF.K RUP4 8841
Review of my Release 12 laptop 8494
Adding a taskflow button to a form 7855
Enhanced Retro & Release 12 7679
Family Pack K 7116
Topic Options
Rate This Topic
#3910 - 16/01/09 10:15 AM Searching Fast formula Text
kp_rapolu Offline
claiming squatters rights

Registered: 15/11/07
Posts: 213
Loc: U.K
Hi,

I am looking for qry to find the list of fast formulas having a certain text in the formula code.

Ex:- List of formulas text contains an string "GB_RATES_HISTORY"

Can anyone help me to get the qry for this.

thanks in advance

KP/..
_________________________
Krishna Prasad Rapolu
Oracle HRMS Consultant

Top
#3911 - 16/01/09 10:29 AM Re: Searching Fast formula Text [Re: kp_rapolu]
CT Online   content
Guru
***

Registered: 11/03/05
Posts: 1080
Loc: Bath
The problem you have of course is that the formula_text is a LONG column, which does not support any functions applied to it such as LIKE...

One suggestion might be to extract the text from all the formulas into, say, a spreadsheet, then do a string search within the spreadsheet.

Alternatively, you could possibly create your own table like FF_FORMULAS_F except the formula_text column should be CLOB. CLOB columns can have things such as LIKE applied to them in WHERE CLAUSES - then just copy the data from FF_FORMULAS_F into your version, and do the query there.

Alternatively, I seem to remember having in my possession a function that converts LONG to VARCHAR, I need to try and resurrect it from wherever I have hidden it.

_________________________
L&K
CT

Remember: A dog is for life, not just for Christmas... unless you're in Korea

Top
#3912 - 16/01/09 10:46 AM Re: Searching Fast formula Text [Re: CT]
bcooper Offline

Guru
*****

Registered: 11/03/05
Posts: 1095
Loc: Earth, Europe, England, here
Providing your ARRAYSIZE and MAXDATA settings are correct you should be able to simply select the contents of a LONG straight into a CLOB without any issues.

You can then manipulate the CLOB with any of the string functions as if it were a VARCHAR2
_________________________
HCM Aces is for sale! Please contact me if you are interested.
Also my random musings courtesy of Twitter

Top
#3917 - 16/01/09 11:48 AM Re: Searching Fast formula Text [Re: bcooper]
kp_rapolu Offline
claiming squatters rights

Registered: 15/11/07
Posts: 213
Loc: U.K
Hi Clive,

thanks for advice, I have got it now.
Here is the steps -

Step1:

create table xx_test_formulas(formula_name varchar2(1000),formula_text CLOB)

Step2:

insert into xx_test_formulas
select formula_name,to_lob(formula_text)
from ff_formulas_f
where sysdate between effective_start_date and effective_end_date;

Step3:

select *
from xx_test_formulas
where formula_text like '%rate_history%'


cheers
KP/..
_________________________
Krishna Prasad Rapolu
Oracle HRMS Consultant

Top
#3919 - 16/01/09 12:33 PM Re: Searching Fast formula Text [Re: kp_rapolu]
SBi Offline
sitting tennant

Registered: 23/05/08
Posts: 344
Loc: UK
Thanks a lot all of you..
I was looking for a solution but was caught up with something else..


Top
#3920 - 16/01/09 12:33 PM Re: Searching Fast formula Text [Re: kp_rapolu]
CT Online   content
Guru
***

Registered: 11/03/05
Posts: 1080
Loc: Bath
Cool!

OK I took the bait on my third alternative, which was to rustle up the function - I've done some rudimentary testing (the only kind I know, as anyone who knows me will tell you!) on my R12 instance, and I picked up 2 results:

Formula UK_PRORATION_GRADE_RATE, eff date 01/01/1901 contains the string GB_RATES_HISTORY
Formula UK_PRORATION_SPINAL_POINT, eff date 01/01/1901 contains the string GB_RATES_HISTORY

The scripts that I used are attached - one is the package header/body, the other is the script that makes use of the package function.

Usual disclaimers apply, unless you want to pay me to support it!


Attachments
search_ff_text.zip (53 downloads)



Edited by CT (16/01/09 12:40 PM)
_________________________
L&K
CT

Remember: A dog is for life, not just for Christmas... unless you're in Korea

Top
#3923 - 16/01/09 01:22 PM Re: Searching Fast formula Text [Re: CT]
kp_rapolu Offline
claiming squatters rights

Registered: 15/11/07
Posts: 213
Loc: U.K
thanks for Script
_________________________
Krishna Prasad Rapolu
Oracle HRMS Consultant

Top



Moderator:  bcooper, CT 
Forum Stats
756 Members
48 Forums
1517 Topics
7286 Posts

Max Online: 63 @ 24/11/10 07:21 AM
Today's Birthdays
No Birthdays
Recent vacancies
Tea boy available 4 basic chores & some! services
by Simon_Mc
19/01/12 03:59 PM
Top Posters
bcooper 1095
CT 1080
delboy 500
Geoff Dixon 369
SBi 344
vkumar 223
kp_rapolu 213
cbrookes 197
Gavin Harris 160
Gus 132
February
Su M Tu W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29