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
-----Original Message-----
From: ryoung [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 12, 2000 12:20 PM
To: [EMAIL PROTECTED]
Subject: concatenate resultsets
i'm in a situation where a sql database will contain
multiple tables with identical schema. i need to pass
on a resultset. in the past, the software talked to
some data store [not always sql databases] where all
the "rows" of a given semantic meaning existed in one
known table: one table, one query, one resultset --
no problem.
i should know, or can discover, the list of table names
containing the rows of interest at runtime.
what's got me flummoxed is how to loop these tables
and still pass on one resultset? SELECT, in sql
syntax, doesn't seem to support querying multiple tables.
nor does resultset seem to support concatenation into
one resultset.
has anyone solved this problem, or seen a reference to
a solution??
thanx,
robert young
___________________________________________________________________________
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
___________________________________________________________________________
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