This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01BFB475.9BA90EC0
Content-Type: text/plain;
charset="iso-8859-1"
sorry about the rich text.
And that makes perfect sense.
Thanks
Shawn Regan
-----Original Message-----
From: Olive, Christopher M Mr USACHPPM
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 02, 2000 9:52 AM
To: '[EMAIL PROTECTED]'
Subject: RE: joining tables
first thing's first. please post in plain text instead of HTML. it makes
it MUCH easier to help you.
second.
you're querying from three different tables. since you only specify one in
your where clause, you get what's called a "cartesian product". what you
need to do is make sure all the tables from which you query are joined
appropriately.
ex. (i'm assuming the primary keys are the same in each table, and that
products is a subtable of category.)
WHERE CLIENTS.CLIENT_NAME='#session.client#' AND
PRODUCTS.client_name= CLIENTS.client_name AND
CATEGORY.category_id = products.category_id.
does this make sense?
Chris Olive
DOHRS Website Administrator
[EMAIL PROTECTED]
-----Original Message-----
From: Shawn Regan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 02, 2000 12:25 PM
To: '[EMAIL PROTECTED]'
Subject: OT: joining tables
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01BFB452.F8791E40
Content-Type: text/plain;
charset="iso-8859-1"
hey people,
i'm doing a join in this query:
SELECT CLIENTS.CLIENT_NAME, PRODUCTS.PRODUCT_NAME, CATEGORY.CAT_ID,
CATEGORY.CATEGORIES
FROM CLIENTS, PRODUCTS, CATEGORY
WHERE CLIENTS.CLIENT_NAME='#session.client#'
I have only one record in the database right now for testing. so there is
only one client. But this query keeps pull out the one client as two
different clients.
I can't figure it out.
Shawn Regan
------_=_NextPart_001_01BFB452.F8791E40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>OT: joining tables</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>hey people,</FONT>
</P>
<P><FONT SIZE=3D2>i'm doing a join in this query:</FONT>
</P>
<P><FONT SIZE=3D2>SELECT CLIENTS.CLIENT_NAME, =
PRODUCTS.PRODUCT_NAME, CATEGORY.CAT_ID, CATEGORY.CATEGORIES</FONT>
<BR><FONT SIZE=3D2>FROM CLIENTS, PRODUCTS, CATEGORY</FONT>
<BR><FONT SIZE=3D2>WHERE =
CLIENTS.CLIENT_NAME=3D'#session.client#'</FONT>
</P>
<P><FONT SIZE=3D2>I have only one record in the database right now for =
testing. so there is only one client. But this query keeps pull out the =
one client as two different clients.</FONT></P>
<P><FONT SIZE=3D2>I can't figure it out.</FONT>
</P>
<P><FONT SIZE=3D2>Shawn Regan</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01BFB452.F8791E40--
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------_=_NextPart_001_01BFB475.9BA90EC0
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12">
<TITLE>RE: joining tables</TITLE>
</HEAD>
<BODY>
<BR>
<P><FONT SIZE=2>sorry about the rich text. </FONT>
</P>
<P><FONT SIZE=2>And that makes perfect sense.</FONT>
</P>
<P><FONT SIZE=2>Thanks</FONT>
</P>
<P><FONT SIZE=2>Shawn Regan</FONT>
</P>
<BR>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Olive, Christopher M Mr USACHPPM</FONT>
<BR><FONT SIZE=2>[<A
HREF="mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</A>]</FONT>
<BR><FONT SIZE=2>Sent: Tuesday, May 02, 2000 9:52 AM</FONT>
<BR><FONT SIZE=2>To: '[EMAIL PROTECTED]'</FONT>
<BR><FONT SIZE=2>Subject: RE: joining tables</FONT>
</P>
<BR>
<P><FONT SIZE=2>first thing's first. please post in plain text instead of
HTML. it makes</FONT>
<BR><FONT SIZE=2>it MUCH easier to help you.</FONT>
</P>
<P><FONT SIZE=2>second.</FONT>
</P>
<P><FONT SIZE=2>you're querying from three different tables. since you only
specify one in</FONT>
<BR><FONT SIZE=2>your where clause, you get what's called a "cartesian
product". what you</FONT>
<BR><FONT SIZE=2>need to do is make sure all the tables from which you query are
joined</FONT>
<BR><FONT SIZE=2>appropriately.</FONT>
</P>
<P><FONT SIZE=2>ex. (i'm assuming the primary keys are the same in each table, and
that</FONT>
<BR><FONT SIZE=2>products is a subtable of category.)</FONT>
</P>
<P><FONT SIZE=2>WHERE CLIENTS.CLIENT_NAME='#session.client#' AND</FONT>
<BR> <FONT SIZE=2>PRODUCTS.client_name=
CLIENTS.client_name AND</FONT>
<BR> <FONT SIZE=2>CATEGORY.category_id =
products.category_id.</FONT>
</P>
<BR>
<P><FONT SIZE=2>does this make sense?</FONT>
</P>
<P><FONT SIZE=2>Chris Olive</FONT>
<BR><FONT SIZE=2>DOHRS Website Administrator</FONT>
<BR><FONT SIZE=2>[EMAIL PROTECTED]</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Shawn Regan [<A
HREF="mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</A>]</FONT>
<BR><FONT SIZE=2>Sent: Tuesday, May 02, 2000 12:25 PM</FONT>
<BR><FONT SIZE=2>To: '[EMAIL PROTECTED]'</FONT>
<BR><FONT SIZE=2>Subject: OT: joining tables</FONT>
</P>
<BR>
<P><FONT SIZE=2>This message is in MIME format. Since your mail reader does not
understand</FONT>
<BR><FONT SIZE=2>this format, some or all of this message may not be legible.</FONT>
</P>
<P><FONT SIZE=2>------_=_NextPart_001_01BFB452.F8791E40</FONT>
<BR><FONT SIZE=2>Content-Type: text/plain;</FONT>
<BR> <FONT
SIZE=2>charset="iso-8859-1"</FONT>
</P>
<P><FONT SIZE=2>hey people,</FONT>
</P>
<P><FONT SIZE=2>i'm doing a join in this query:</FONT>
</P>
<P><FONT SIZE=2>SELECT CLIENTS.CLIENT_NAME, PRODUCTS.PRODUCT_NAME,
CATEGORY.CAT_ID,</FONT>
<BR><FONT SIZE=2>CATEGORY.CATEGORIES</FONT>
<BR><FONT SIZE=2>FROM CLIENTS, PRODUCTS, CATEGORY</FONT>
<BR><FONT SIZE=2>WHERE CLIENTS.CLIENT_NAME='#session.client#'</FONT>
</P>
<P><FONT SIZE=2>I have only one record in the database right now for testing. so there
is</FONT>
<BR><FONT SIZE=2>only one client. But this query keeps pull out the one client as
two</FONT>
<BR><FONT SIZE=2>different clients.</FONT>
</P>
<P><FONT SIZE=2>I can't figure it out.</FONT>
</P>
<P><FONT SIZE=2>Shawn Regan</FONT>
</P>
<P><FONT SIZE=2>------_=_NextPart_001_01BFB452.F8791E40</FONT>
<BR><FONT SIZE=2>Content-Type: text/html;</FONT>
<BR> <FONT
SIZE=2>charset="iso-8859-1"</FONT>
<BR><FONT SIZE=2>Content-Transfer-Encoding: quoted-printable</FONT>
</P>
<P><FONT SIZE=2><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
3.2//EN"></FONT>
<BR><FONT SIZE=2><HTML></FONT>
<BR><FONT SIZE=2><HEAD></FONT>
<BR><FONT SIZE=2><META HTTP-EQUIV=3D"Content-Type"
CONTENT=3D"text/html; =</FONT>
<BR><FONT SIZE=2>charset=3Diso-8859-1"></FONT>
<BR><FONT SIZE=2><META NAME=3D"Generator" CONTENT=3D"MS Exchange
Server version =</FONT>
<BR><FONT SIZE=2>5.5.2650.12"></FONT>
<BR><FONT SIZE=2><TITLE>OT: joining tables</TITLE></FONT>
<BR><FONT SIZE=2></HEAD></FONT>
<BR><FONT SIZE=2><BODY></FONT>
</P>
<P><FONT SIZE=2><P><FONT SIZE=3D2>hey people,</FONT></FONT>
<BR><FONT SIZE=2></P></FONT>
</P>
<P><FONT SIZE=2><P><FONT SIZE=3D2>i'm doing a join in this
query:</FONT></FONT>
<BR><FONT SIZE=2></P></FONT>
</P>
<P><FONT SIZE=2><P><FONT SIZE=3D2>SELECT&nbsp; CLIENTS.CLIENT_NAME,
=</FONT>
<BR><FONT SIZE=2>PRODUCTS.PRODUCT_NAME, CATEGORY.CAT_ID,
CATEGORY.CATEGORIES</FONT></FONT>
<BR><FONT SIZE=2><BR><FONT SIZE=3D2>FROM CLIENTS, PRODUCTS,
CATEGORY</FONT></FONT>
<BR><FONT SIZE=2><BR><FONT SIZE=3D2>WHERE =</FONT>
<BR><FONT SIZE=2>CLIENTS.CLIENT_NAME=3D'#session.client#'</FONT></FONT>
<BR><FONT SIZE=2></P></FONT>
</P>
<P><FONT SIZE=2><P><FONT SIZE=3D2>I have only one record in the database
right now for =</FONT>
<BR><FONT SIZE=2>testing. so there is only one client. But this query keeps pull out
the =</FONT>
<BR><FONT SIZE=2>one client as two different clients.</FONT></P></FONT>
</P>
<P><FONT SIZE=2><P><FONT SIZE=3D2>I can't figure it
out.</FONT></FONT>
<BR><FONT SIZE=2></P></FONT>
</P>
<P><FONT SIZE=2><P><FONT SIZE=3D2>Shawn Regan</FONT></FONT>
<BR><FONT SIZE=2></P></FONT>
</P>
<P><FONT SIZE=2></BODY></FONT>
<BR><FONT SIZE=2></HTML></FONT>
<BR><FONT SIZE=2>------_=_NextPart_001_01BFB452.F8791E40--</FONT>
<BR><FONT
SIZE=2>----------------------------------------------------------------------------</FONT>
<BR><FONT SIZE=2>--</FONT>
<BR><FONT SIZE=2>Archives: <A HREF="http://www.eGroups.com/list/cf-talk"
TARGET="_blank">http://www.eGroups.com/list/cf-talk</A></FONT>
<BR><FONT SIZE=2>To Unsubscribe visit</FONT>
<BR><FONT SIZE=2><A
HREF="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk"
TARGET="_blank">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk</A>
or</FONT>
<BR><FONT SIZE=2>send a message to [EMAIL PROTECTED] with
'unsubscribe' in</FONT>
<BR><FONT SIZE=2>the body.</FONT>
<BR><FONT
SIZE=2>------------------------------------------------------------------------------</FONT>
<BR><FONT SIZE=2>Archives: <A HREF="http://www.eGroups.com/list/cf-talk"
TARGET="_blank">http://www.eGroups.com/list/cf-talk</A></FONT>
<BR><FONT SIZE=2>To Unsubscribe visit <A
HREF="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk"
TARGET="_blank">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk</A>
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.</FONT></P>
</BODY>
</HTML>
------_=_NextPart_001_01BFB475.9BA90EC0--
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.