RE: Query syntax help - Select 1 from multiple rows
Posted in 2000
Topics: General Discussion
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_01BF83FD.1B6E56A6 Content-Type: text/plain Further info required. Do you need FIRST record, LAST record or any other one ??? Shahid Mehmood Software Designer II Information Systems Department The Aga Khan University Karachi Official:Y > -----Original Message----- > From: PN [SMTP:pnguyen@lightspeed.net] > Sent: Thursday, March 02, 2000 05:12 > To: informix-list@iiug.org > Subject: Query syntax help - Select 1 from multiple rows > > I need help: > Table A: > Cust_no > > Table B: > Cust_no > Cust_name > > Table B can contain duplicated cust_no's, each with an alternate name for > the customer > How can I select ONLY 1 record from table B using a cust_no from table A ? > Any help is greatly appreciated. > Thanks > PN > > ------_=_NextPart_001_01BF83FD.1B6E56A6 Content-Type: text/html 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=3Dus-ascii"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2650.12"> <TITLE>RE: Query syntax help - Select 1 from multiple rows</TITLE> </HEAD> <BODY> <P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Comic Sans MS">Further info = required. Do you need FIRST record, LAST record or any other one = ???</FONT> </P> <P><B><FONT SIZE=3D2 FACE=3D"Comic Sans MS">Shahid Mehmood</FONT></B> <BR><FONT SIZE=3D1 FACE=3D"Comic Sans MS">Software Designer II</FONT> <BR><FONT SIZE=3D1 FACE=3D"Comic Sans MS">Information Systems = Department</FONT> <BR><FONT SIZE=3D1 FACE=3D"Comic Sans MS">The Aga Khan = University</FONT> <BR><FONT SIZE=3D1 FACE=3D"Comic Sans MS">Karachi</FONT> <BR><FONT SIZE=3D1 FACE=3D"Comic Sans MS">Official:Y</FONT> </P> <BR> <UL> <P><FONT SIZE=3D1 FACE=3D"Arial">-----Original Message-----</FONT> <BR><B><FONT SIZE=3D1 FACE=3D"Arial">From: </FONT></B> <FONT = SIZE=3D1 FACE=3D"Arial">PN [SMTP:pnguyen@lightspeed.net]</FONT> <BR><B><FONT SIZE=3D1 FACE=3D"Arial">Sent: </FONT></B> <FONT = SIZE=3D1 FACE=3D"Arial">Thursday, March 02, 2000 05:12</FONT> <BR><B><FONT SIZE=3D1 = FACE=3D"Arial">To: </FONT></B> <FONT SIZE=3D1 = FACE=3D"Arial">informix-list@iiug.org</FONT> <BR><B><FONT SIZE=3D1 = FACE=3D"Arial">Subject: </FONT>= </B> <FONT SIZE=3D1 FACE=3D"Arial">Query syntax help - Select 1 from = multiple rows</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">I need help:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Table A:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Cust_no</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">Table B:</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Cust_no</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Cust_name</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">Table B can contain duplicated = cust_no's, each with an alternate name for</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">the customer</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">How can I select ONLY 1 record from = table B using a cust_no from table A ?</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Any help is greatly = appreciated.</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Thanks</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">PN</FONT> </P> <BR> </UL> </BODY> </HTML> ------_=_NextPart_001_01BF83FD.1B6E56A6--