Wild Card/Generic retrieval

Landers, Dianne DLanders@pcc-structurals.com
Tue, 9 Sep 2003 10:50:55 -0700


This is a multi-part message in MIME format.

------_=_NextPart_001_01C376FA.EB13F25F
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

ok.  thanks for the help.
=20
d

	-----Original Message-----
	From: Deskin, Bob [mailto:Bob.Deskin@Cognos.COM]=20
	Sent: Tuesday, September 09, 2003 10:33 AM
	To: powerh-l@lists.swau.edu
	Subject: RE: Wild Card/Generic retrieval
=09
=09

	The section you were reading refers to pattern matching as
opposed to generic or partial key retrieval. When you use a CHOOSE, you
are providing a key or partial-key value. You can't use a PowerHouse
pattern in a CHOOSE. The @ in this case indicates a partial key
retrieval for indexed files (or relational). So "Mac@" returns all
values starting with "Mac".

	In order to retrieve all values ending with "th", you would have
to read each record sequentially and check the value. To do that, use a
SELECT with the MATCHPATTERN function as in:

	SELECT IF MATCHPATTERN(TRUNCATE(partno),"@th")=20

	The TRUNCATE removes trailing spaces, otherwise you'd have to
match them.=20

	Bob Deskin             =20
	Product Manager, Application Development Tools, Cognos Inc.=20
	bob.deskin@cognos.com (613) 738-1338 ext 7268 FAX: (613)
727-1178=20
	3755 Riverside Drive P.O. Box 9707 Stn. T, Ottawa ON K1G 4K9
CANADA=20

	-----Original Message-----=20
	From: Landers, Dianne [mailto:DLanders@pcc-structurals.com]=20
	Sent: Tuesday, September 09, 2003 1:12 PM=20
	To: powerh-l@lists.swau.edu=20
	Subject: Wild Card/Generic retrieval=20


	Running Unix 11.0, oracle 8.1.7, ph 8.23d7.=20
	In the manual Powerhouse Rules, the section on using
metacharacters, for=20
	the generic character at sign(@), the function description:=20

	Matches zero or more characters (alphabetic, numeric, or
special).=20
	Gives the example that I'm trying to use.....=20
	The pattern "@th" matches any value ending with "th".=20

	I'm trying to retrieve records by the following:=20
	> Access partmaster=20
	> Choose partno '@03'=20
	> Rep partno=20
	> Go=20
	 =20
	There is a partno in the database P03, that should be reported.
But I=20
	get zero records found.=20
	I tried this code, and get an error message:=20

	> access partmaster=20
	> choose partno "@"=20
	                ^^^=20
	*E* The generic choose character is not allowed without a
prefix.=20
	>=20

	So is the manual wrong?  I'm I interpreting the manual wrong?
I'm=20
	confused.=20


	=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D=20
	Mailing list: powerh-l@lists.swau.edu=20
	Subscribe: "subscribe" in message body to
powerh-l-request@lists.swau.edu=20
	Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.swau.edu=20
	http://lists.swau.edu/mailman/listinfo/powerh-l=20
	This list is closed, thus to post to the list you must be a
subscriber.=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_01C376FA.EB13F25F
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D259085717-09092003><FONT face=3DArial color=3D#0000ff =

size=3D2>ok.&nbsp; thanks for the help.</FONT></SPAN></DIV>
<DIV><SPAN class=3D259085717-09092003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D259085717-09092003><FONT face=3DArial color=3D#0000ff =

size=3D2>d</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr =
align=3Dleft><FONT=20
  face=3DTahoma size=3D2>-----Original Message-----<BR><B>From:</B> =
Deskin, Bob=20
  [mailto:Bob.Deskin@Cognos.COM] <BR><B>Sent:</B> Tuesday, September 09, =
2003=20
  10:33 AM<BR><B>To:</B> powerh-l@lists.swau.edu<BR><B>Subject:</B> RE: =
Wild=20
  Card/Generic retrieval<BR><BR></FONT></DIV>
  <P><FONT size=3D2>The section you were reading refers to pattern =
matching as=20
  opposed to generic or partial key retrieval. When you use a CHOOSE, =
you are=20
  providing a key or partial-key value. You can't use a PowerHouse =
pattern in a=20
  CHOOSE. The @ in this case indicates a partial key retrieval for =
indexed files=20
  (or relational). So "Mac@" returns all values starting with =
"Mac".</FONT></P>
  <P><FONT size=3D2>In order to retrieve all values ending with "th", =
you would=20
  have to read each record sequentially and check the value. To do that, =
use a=20
  SELECT with the MATCHPATTERN function as in:</FONT></P>
  <P><FONT size=3D2>SELECT IF =
MATCHPATTERN(TRUNCATE(partno),"@th")</FONT> </P>
  <P><FONT size=3D2>The TRUNCATE removes trailing spaces, otherwise =
you'd have to=20
  match them.</FONT> </P>
  <P><FONT size=3D2>Bob=20
  =
Deskin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
  </FONT><BR><FONT size=3D2>Product Manager, Application Development =
Tools, Cognos=20
  Inc.</FONT> <BR><FONT size=3D2>bob.deskin@cognos.com (613) 738-1338 =
ext 7268=20
  FAX: (613) 727-1178</FONT> <BR><FONT size=3D2>3755 Riverside Drive =
P.O. Box 9707=20
  Stn. T, Ottawa ON K1G 4K9 CANADA</FONT> </P>
  <P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT =
size=3D2>From:=20
  Landers, Dianne [<A=20
  =
href=3D"mailto:DLanders@pcc-structurals.com">mailto:DLanders@pcc-structur=
als.com</A>]</FONT>=20
  <BR><FONT size=3D2>Sent: Tuesday, September 09, 2003 1:12 PM</FONT> =
<BR><FONT=20
  size=3D2>To: powerh-l@lists.swau.edu</FONT> <BR><FONT =
size=3D2>Subject: Wild=20
  Card/Generic retrieval</FONT> </P><BR>
  <P><FONT size=3D2>Running Unix 11.0, oracle 8.1.7, ph 8.23d7.</FONT> =
<BR><FONT=20
  size=3D2>In the manual Powerhouse Rules, the section on using =
metacharacters,=20
  for</FONT> <BR><FONT size=3D2>the generic character at sign(@), the =
function=20
  description:</FONT> </P>
  <P><FONT size=3D2>Matches zero or more characters (alphabetic, =
numeric, or=20
  special).</FONT> <BR><FONT size=3D2>Gives the example that I'm trying =
to=20
  use.....</FONT> <BR><FONT size=3D2>The pattern "@th" matches any value =
ending=20
  with "th".</FONT> </P>
  <P><FONT size=3D2>I'm trying to retrieve records by the =
following:</FONT>=20
  <BR><FONT size=3D2>&gt; Access partmaster</FONT> <BR><FONT =
size=3D2>&gt; Choose=20
  partno '@03'</FONT> <BR><FONT size=3D2>&gt; Rep partno</FONT> =
<BR><FONT=20
  size=3D2>&gt; Go</FONT> <BR><FONT size=3D2>&nbsp;</FONT> <BR><FONT =
size=3D2>There is=20
  a partno in the database P03, that should be reported.&nbsp; But =
I</FONT>=20
  <BR><FONT size=3D2>get zero records found. </FONT><BR><FONT size=3D2>I =
tried this=20
  code, and get an error message:</FONT> </P>
  <P><FONT size=3D2>&gt; access partmaster</FONT> <BR><FONT =
size=3D2>&gt; choose=20
  partno "@"</FONT> <BR><FONT=20
  =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;=20
  ^^^</FONT> <BR><FONT size=3D2>*E* The generic choose character is not =
allowed=20
  without a prefix.</FONT> <BR><FONT size=3D2>&gt; </FONT></P>
  <P><FONT size=3D2>So is the manual wrong?&nbsp; I'm I interpreting the =
manual=20
  wrong?&nbsp; I'm</FONT> <BR><FONT size=3D2>confused.</FONT> </P><BR>
  <P><FONT size=3D2>=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D</FONT>=20
  <BR><FONT size=3D2>Mailing list: powerh-l@lists.swau.edu</FONT> =
<BR><FONT=20
  size=3D2>Subscribe: "subscribe" in message body to=20
  powerh-l-request@lists.swau.edu</FONT> <BR><FONT size=3D2>Unsubscribe: =

  "unsubscribe &lt;password&gt;" in message body to=20
  powerh-l-request@lists.swau.edu</FONT> <BR><FONT size=3D2><A=20
  href=3D"http://lists.swau.edu/mailman/listinfo/powerh-l"=20
  =
target=3D_blank>http://lists.swau.edu/mailman/listinfo/powerh-l</A></FONT=
>=20
  <BR><FONT size=3D2>This list is closed, thus to post to the list you =
must be a=20
  subscriber.</FONT> </P>
  <P><FONT size=3D2>Join us at Cognos' biggest event of the year<I> =
Enterprise=20
  2003, The Cognos Business Forum</I>.&nbsp; 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> <A=20
  href=3D"http://www.cognos.com/enterprise03"=20
  target=3D_blank>http://www.cognos.com/enterprise03</A></U> for more =
details.=20
  </FONT></P>
  <P><FONT size=3D2>This message may contain privileged and/or =
confidential=20
  information.&nbsp; If you have received this e-mail in error or are =
not the=20
  intended recipient, you may not use, copy, disseminate or distribute =
it; do=20
  not open any attachments, delete it immediately from your system and =
notify=20
  the sender promptly by e-mail that you have done so.&nbsp; Thank=20
  you.</FONT></P></BLOCKQUOTE></BODY></HTML>
=00
------_=_NextPart_001_01C376FA.EB13F25F--