Wild Card/Generic retrieval
Edis, Robert
REdis@Blistex.com
Wed, 10 Sep 2003 12:28:45 -0500
This is a multi-part message in MIME format.
------_=_NextPart_001_01C377C0.FC80E1FB
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
What about SELECT IF 'th' =3D LOWER(REVERSE(TRUNCATE(partno)))[1:2]?
-----Original Message-----
From: Deskin, Bob [mailto:Bob.Deskin@cognos.com]
Sent: Wednesday, September 10, 2003 12:08 PM
To: 'John Hunter'; powerh-l@lists.swau.edu
Subject: RE: Wild Card/Generic retrieval
Actually, since the original requirement was to find "th" in the last =
two character positions, excluding blanks, a substring would be a direct =
test as follows:
=20
SELECT IF "th" =3D partno[(SIZE(TRUNCATE(partno))-1:2]
=20
Bob
-----Original Message-----
From: John Hunter [mailto:jthunter@nbnet.nb.ca]
Sent: Wednesday, September 10, 2003 12:15 PM
To: powerh-l@lists.swau.edu
Subject: RE: Wild Card/Generic retrieval
Not to be too picky with responses...
=20
but what if the value of partno was '4th6th' ? ie. a value with 2 =
strings of th?
=20
then perhaps=20
=20
> select if 'th' =3D reverse(reverse(truncate(partno))[1:2])
=20
But I'm not sure if reverse would be more efficient than matchpattern.
=20
-John
-----Original Message-----=20
=20
If 0 =3D index(partno,"th") - size(truncate(part-no)) - 1=20
Join us at Cognos' biggest event of the year Enterprise 2003, The Cognos =
Business Forum. Taking place in over 25 cities around the world, it's an =
opportunity for Business and IT leaders to learn about strategies for =
driving performance. Visit http://www.cognos.com/enterprise03 for more =
details.=20
This message may contain privileged and/or confidential information. If =
you have received this e-mail in error or are not the intended =
recipient, you may not use, copy, disseminate or distribute it; do not =
open any attachments, delete it immediately from your system and notify =
the sender promptly by e-mail that you have done so. Thank you.
------_=_NextPart_001_01C377C0.FC80E1FB
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>RE: Wild Card/Generic retrieval</TITLE>
<META content=3D"MSHTML 6.00.2722.900" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D661052617-10092003>What=20
about SELECT IF 'th' =3D=20
LOWER(REVERSE(TRUNCATE(partno)))[1:2]?</SPAN></FONT></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Deskin, Bob=20
[mailto:Bob.Deskin@cognos.com]<BR><B>Sent:</B> Wednesday, September =
10, 2003=20
12:08 PM<BR><B>To:</B> 'John Hunter';=20
powerh-l@lists.swau.edu<BR><B>Subject:</B> RE: Wild Card/Generic=20
retrieval<BR><BR></FONT></DIV>
<DIV><SPAN class=3D549270217-10092003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Actually, since the original requirement was to find "th" in =
the last=20
two character positions, excluding blanks, a substring would be a =
direct test=20
as follows:</FONT></SPAN></DIV>
<DIV><SPAN class=3D549270217-10092003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D549270217-10092003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>SELECT IF "th" =3D=20
partno[(SIZE(TRUNCATE(partno))-1:2]</FONT></SPAN></DIV>
<DIV><SPAN class=3D549270217-10092003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D549270217-10092003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Bob</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> John Hunter=20
[mailto:jthunter@nbnet.nb.ca]<BR><B>Sent:</B> Wednesday, September =
10, 2003=20
12:15 PM<BR><B>To:</B> powerh-l@lists.swau.edu<BR><B>Subject:</B> =
RE: Wild=20
Card/Generic retrieval<BR><BR></FONT></DIV>
<DIV><SPAN class=3D240445515-10092003>Not to be too picky with=20
responses...</SPAN></DIV>
<DIV><SPAN class=3D240445515-10092003></SPAN> </DIV>
<DIV><SPAN class=3D240445515-10092003>but what if the value of =
partno was=20
'4th6th' ? ie. a value with 2 strings of th?</SPAN></DIV>
<DIV><SPAN class=3D240445515-10092003></SPAN> </DIV>
<DIV><SPAN class=3D240445515-10092003>then perhaps </SPAN></DIV>
<DIV><SPAN class=3D240445515-10092003></SPAN> </DIV>
<DIV><SPAN class=3D240445515-10092003>> select if 'th' =3D=20
reverse(reverse(truncate(partno))[1:2])</SPAN></DIV>
<DIV><SPAN class=3D240445515-10092003></SPAN> </DIV>
<DIV><SPAN class=3D240445515-10092003>But I'm not sure if reverse =
would be=20
more efficient than matchpattern.</SPAN></DIV>
<DIV><SPAN class=3D240445515-10092003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D240445515-10092003>-John</SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
size=3D2><FONT=20
face=3DTahoma>-----Original Message-----<SPAN =
class=3D240445515-10092003><FONT=20
face=3DArial =
color=3D#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
size=3D2><FONT=20
face=3DTahoma><SPAN=20
class=3D240445515-10092003></SPAN></FONT></FONT> </DIV>
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
size=3D2><FONT=20
face=3DTahoma><SPAN =
class=3D240445515-10092003> </SPAN></FONT>If 0 =3D=20
index(partno,"th") - size(truncate(part-no)) - 1</FONT>=20
</DIV></BLOCKQUOTE></BLOCKQUOTE><BR>
<P><FONT face=3DArial size=3D2>Join us at Cognos' biggest event of the =
year<I>=20
Enterprise 2003, The Cognos Business Forum</I>. Taking place in over =
25 cities=20
around the world, it's an opportunity for Business and IT leaders to =
learn=20
about strategies for driving performance. Visit<U>=20
http://www.cognos.com/enterprise03</U> for more details. =
</FONT></P><BR>
<P><FONT face=3DArial size=3D2>This message may contain privileged =
and/or=20
confidential information. If you have received this e-mail in error or =
are not=20
the intended recipient, you may not use, copy, disseminate or =
distribute it;=20
do not open any attachments, delete it immediately from your system =
and notify=20
the sender promptly by e-mail that you have done so. Thank=20
you.</FONT></P></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C377C0.FC80E1FB--