Don Albertson wrote:
[EMAIL PROTECTED] wrote:Yes..I have. I mean for example, when you do a simple query like this Select 1,2,3 UNION Select 4,5,6, it should display all rows for all select statements but it only displays 3,6. I thought a UNION could be used for multiple tables with unrelated data, as long as am selecting the same fields or number of fields?What happens if you replace the sql tags with scriptlet code thatcreates a Connection, a Statement, executes the query text and returns the ResultSet? Does that returned ResultSet contain what you expect?On 7/12/05, McCormack, Chris <[EMAIL PROTECTED]> wrote:Have you checked the row coming back from t2 exists in t1 also ? That would explain only one row being returned.-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 12 July 2005 15:30 To: taglibs-user@jakarta.apache.org Subject: help!! why UNION of multiple tables is not working I have Tomcat 5.0, Servlet 2.4, jstl and standard taglibs 1.1. And all the required dependencies. I want to get a UNION of multiple tables so like <sql:query dataSource="" var="row"> SELECT name, user, addr from t1 UNION SELECT name, user, addr from t2 </sql:query> However, the UNION of multiple tables does not bring forth the right result. It displays the last table fields. In this case, only field in t2. Is this a jstl and standard taglin issue or does this have to do with the fact that I have mysql version 3.23? I am still trying to understand how these taglibs work. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]***************************************************************************** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods Group Limited or its subsidiaries. Please note that e-mail communications may be monitored. The Registered Office of Littlewoods Group Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Group Limited is 5059352. *****************************************************************************This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is it not UNION ALL ? -- Regards Dave Butler butlerdi-at-manxsoft-dot-net Also on Skype as butlerdi Get Skype here http://www.skype.com/download.html ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************
begin:vcard fn:Dave Butler n:Butler;Dave email;internet:[EMAIL PROTECTED] x-mozilla-html:TRUE version:2.1 end:vcard
smime.p7s
Description: S/MIME Cryptographic Signature