Home » SQL & PL/SQL » SQL & PL/SQL » WILD CARD search (Oracle 11g)
WILD CARD search [message #594950] Wed, 04 September 2013 07:25 Go to next message
developer12
Messages: 88
Registered: July 2013
Member
Insert into PROFILE
   (INSTANCE, PROFILENAME, USER_DATA, UPDATE_DATE)
 Values
   (138, 'Test A', 'SRC!-1,ARCHIVE_OPT!-1,DATE_FIELD!155,DATE_RULE!1,DISTINCT!1', TO_DATE('01/20/2005 13:35:33', 'MM/DD/YYYY HH24:MI:SS'));
/
Insert into RULES
   (ID, NAME)
 Values
   (155, 'DATE_TEST');


I want a code something of this sort:
select profilename from PROFILE where user_data like '%DATE_RULE!115%';


Output will be "Test A"
Now, this is just a single value from RULES table used to find the data of PROFILE table.
I will have to run the query on multiple values of RULES tables to find records containing a string format of sort "DATE_RULE!<rule_no>".
Does anyone have any suggestion to search on WILD CARDs like these?
Re: WILD CARD search [message #594954 is a reply to message #594950] Wed, 04 September 2013 07:34 Go to previous messageGo to next message
Lalit Kumar B
Messages: 1869
Registered: May 2013
Location: World Wide on the Web
Senior Member
Regular expressions
Reg Exp features

{EDIT : Moreover, it is a FAQ, you can search the forum]

[Updated on: Wed, 04 September 2013 07:35]

Report message to a moderator

Re: WILD CARD search [message #594963 is a reply to message #594954] Wed, 04 September 2013 08:07 Go to previous messageGo to next message
developer12
Messages: 88
Registered: July 2013
Member
Thanks Lalit.
This is of great use. Btw, can u guide me as to how I can use a select query in the REGEXP_LIKE clause:
where REGEXP_LIKE (r.user_data,'DATE_RULE!(select something from dual)');  
Re: WILD CARD search [message #594965 is a reply to message #594963] Wed, 04 September 2013 08:47 Go to previous message
Michel Cadot
Messages: 58625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post a clear specification with a test case.

Regards
Michel
Previous Topic: please convert this procedure to oracle.
Next Topic: How to Select data when it has a single quote in the value.
Goto Forum:
  


Current Time: Wed Jul 30 21:39:39 CDT 2014

Total time taken to generate the page: 0.11542 seconds