MySQL Forums
Forum List  »  Oracle

Re: Convert function from Oracle to MySQL
Posted by: Harald Rietman
Date: December 03, 2010 12:37AM

Hi All,

I solved it myself as I was already wondering why they would have made such query on oracle anyway as it can be done more simple in also in a generic way; here my SQL statement as it is now and is working; also no function is needed for it:

select A2.ID, A2.ADDRESS, A2.ADDRESS_TYPE, A2.DESCRIPTION, A1.type BWLIST_TYPE, A3.LIST_LEVEL, A3.SC_ID, A3.SP_PK, A3.APP_ID from BWLIST A1, BWLISTXADDRESS A2, BWLISTXAPPLICATION A3 where A1.id = A2.BWLIST_ID and A2.BWLIST_ID = A3.BWLIST_ID and (INSTR(?, A2.ADDRESS ) > 0) and A3.SP_PK = ? and A3.APP_ID = ?

I am now using the INSTR function to see if the number is in the string provided in the first place any way; probably much faster as well.

/Harald

Options: ReplyQuote


Subject
Views
Written By
Posted
5384
December 01, 2010 08:12AM
Re: Convert function from Oracle to MySQL
2065
December 03, 2010 12:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.