December 19, 2001 at 4:52 am
Union works if the data type is compatible and the number and order of the field must be identical.
e.g combining result from these 2 query:
select a, b, c from tablex
select x,y,z from tablez
December 19, 2001 at 5:00 am
Or even if SQL can coerce the data types to match. Biggest mistake I see with union is that most people leave off the 'ALL' - not realizing that SQL will remove duplicate lines otherwise.
Andy
December 19, 2001 at 10:11 am
January 2, 2002 at 6:48 pm
If you're using the results from these two queries in ADO, use NextRecordset to loop through one then the second result set.
January 2, 2002 at 7:20 pm
Deuce - if you're using union you'll only get one recordset. In some cases returning multiple recordsets will make more sense...union won't work, you need it separated anyway, etc. Multiple recordsets are a great way to reduce round trips.
Andy
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply