Wrox Programmer Forums
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 8th, 2004, 03:42 PM
Authorized User
 
Join Date: Feb 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default UNION BUGS??

I am trying to create an Excel Pivot Table using a ADO connection. The query uses a UNION statement to connect two separate SELECT's. The recordset returned is missing a single record, throwing off my result. Yet if I revert to bringing the data down and putting it on a spreadsheet in two steps, all is correct. Is this a known problem? Is there a work around?

Dave
__________________
Dave
 
Old March 8th, 2004, 04:46 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use Union All

Select * from employees1
union all
select * from employees2


Union removes duplicates, you may have duplicates in your queries.



Sal
 
Old March 8th, 2004, 05:11 PM
Authorized User
 
Join Date: Feb 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. In our 60,000+ records we do have to identical items. Makes me think of something Holmes once said, or was it Spock?

Dave





Similar Threads
Thread Thread Starter Forum Replies Last Post
Bugbase not saving bugs giametta BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 August 6th, 2007 02:48 PM
excel bugs jiggy Excel VBA 0 June 16th, 2006 06:03 PM
ODBC Bugs? sandeepk Oracle ASP 0 February 20th, 2006 09:13 AM
Browser specific bugs dbruins Pro PHP 2 December 16th, 2004 05:21 PM
Search has some bugs?!!! mehdi62b Forum and Wrox.com Feedback 10 September 8th, 2004 09:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.