On Fri, Feb 5, 2010 at 10:54 AM, Ted Roche <[email protected]> wrote:
> 2010/2/5 Ricardo Aráoz <[email protected]>:
>>
>> I think you overlooked ChrTran().
>>
>
> Or UNION and IsAlpha()
>
> SELECT * FROM MyTable where PartID = '12A456789-123'
> UNION
> SELECT * FROM MyTable where PartID LIKE '12A456789-_123' AND
> ISALPHA(SUBSTR(PartID,11,1))
> UNION
> SELECT * FROM MyTable where PartID LIKE '12A456789-123_' AND
> ISALPHA(SUBSTR(PartID,14,1))
>
> Note that unless all the prefix portions of the part numbers are the
> same length, the SUBSTR arguments might have to be calculated on the
> fly.
--------------------------

Doesn't a use of a function in a query kick the snot out of the engine?

You really don't get an index working for you unless of course you
have your index expression identical to the function.  Adding insult
to injury if you have a necessary join the engine won't really use the
super cool index you created.

I have code walk through for SPs that devs write and I sometimes see
UDF()s in there.


-- 
Stephen Russell

Sr. Production Systems Programmer
CIMSgts

901.246-0159 cell

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to