yup, works like a charm.

robert young

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Mike
Williams
Sent: Sunday, June 18, 2000 5:44 PM
To: [EMAIL PROTECTED]
Subject: Re: concatenate resultsets


Robert,

If I'm reading your question correctly.  You should be able to handle it all
in a SQL Select statement using the UNION clause.  Below is a simple example
of the using UNION.

SELECT table1.name, table1.address, table1.city, table1.state, table1.zip
    FROM table1
    WHERE table1.name="Joe"
UNION
SELECT table2.name, table2.address, table2.city, table2.state, table2.zip
    FROM table2
    WHERE table2.name="Joe"

What the UNION clause will do is take the results of both SELECTS and
concatenate them.  The gotcha is that the table structures must match
exactly!  In your case this shouldn't be a problem :)

Hope this helps.

Mike

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to