Re: Need Help W/ Query
Picking apart "43,45,79,32" is easily done in Perl or PHP. But it is really messy in SQL. It would take a Stored Procedure/Function, which would run miserably slowly.
Two SUBSTRING_INDEX calls to find the start/end of the number
MID() to pick out the number
Other code to handle the first/last number
All of this in a loop to check each number.
Yuck!
In Perl/PHP, the regexp /\b$id\b/ would test for $id being in the string.
Perl could remove it thus (perhaps):
$str =~ s/^$id(,|$)//;
$str =~ s/,$id(,|$)/$1/;
Concise, but knarly.
Subject
Written By
Posted
Re: Need Help W/ Query
May 26, 2012 11:26PM
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.