Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7E60A476476 for ; Mon, 9 Dec 2002 16:01:15 -0500 (EST) Received: from mta06-svc.ntlworld.com (mta06-svc.ntlworld.com [62.253.162.46]) by postgresql.org (Postfix) with ESMTP id 40D7947630B for ; Mon, 9 Dec 2002 15:58:46 -0500 (EST) Received: from linux.chrisdomain ([81.97.70.23]) by mta06-svc.ntlworld.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021209205844.BNPI495.mta06-svc.ntlworld.com@linux.chrisdomain> for ; Mon, 9 Dec 2002 20:58:44 +0000 Received: from chris (chris.chrisdomain [192.168.1.35]) by linux.chrisdomain (8.11.0/8.11.6) with SMTP id gB9KcIm01426 for ; Mon, 9 Dec 2002 20:38:18 GMT Message-ID: <000f01c29fc5$afc34960$2301a8c0@chrisdomain> Reply-To: "Chris Jewell" From: "Chris Jewell" To: Subject: Problem with a lookup table! Please help. Date: Mon, 9 Dec 2002 20:58:12 -0000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000C_01C29FC5.AF8025E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/104 X-Sequence-Number: 10692 This is a multi-part message in MIME format. ------=_NextPart_000_000C_01C29FC5.AF8025E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, In my capacity as a vet student, I'm trying to create a database of antibio= tics. The way that I have set it up so far is to have one main table listi= ng the antibiotics versus their respective efficacies against the four majo= r groups of bacteria. Due to the way that my PHP frontend works, I have as= signed a number to the efficacy - 1 being excellent and 5 being poor effica= cy against the particular bacterium. However, I now want to have a new tab= le which converts numbers into words. The problem is this, if I join the m= ain table with the "translation" lookup table, the column names for each of= the four categories in the main default to the column name in the lookup t= able and hence are all the same. What SQL expression should I use to trans= late the cryptic numbers into plain english whilst preserving the column he= adings in the main table? Regards, Chris J ------=_NextPart_000_000C_01C29FC5.AF8025E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
In my capacity as a vet student, I'm tryin= g to=20 create a database of antibiotics.  The way that I have set it up so fa= r is=20 to have one main table listing the antibiotics versus their respective=20 efficacies against the four major groups of bacteria.  Due to the way = that=20 my PHP frontend works, I have assigned a number to the efficacy - 1 being= =20 excellent and 5 being poor efficacy against the particular bacterium. = =20 However, I now want to have a new table which converts numbers into words.&= nbsp;=20 The problem is this, if I join the main table with the "translation" lookup= =20 table, the column names for each of the four categories in the main default= to=20 the column name in the lookup table and hence are all the same.  What = SQL=20 expression should I use to translate the cryptic numbers into plain english= =20 whilst preserving the column headings in the main table?
 
Regards,
 
Chris J
------=_NextPart_000_000C_01C29FC5.AF8025E0--