I thought of that, but they aren't dup records: he's adding the SRCE
column so the data in each query is different.

On Wed, Jul 23, 2008 at 03:21, Dave Crozier <[EMAIL PROTECTED]> wrote:
> Use "Union all" not union. The union on its own removes duplicate records.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Sytze de Boer
>
> I'm trying to extract data from 3 seperate tables as follows
> Select date,stockcode,stktype,invnum,SUM(qty) ,sell,desc, "H" as SRCE From
> winhst  Where stktype=333 UNION ;
> Select date,stockcode,stktype,invnum,SUM(qty) ,sell,desc, "J" as SRCE From
> wintime Where stktype=333 UNION ;
> Select date,stockcode,stktype,invnum,SUM(qty) ,sell,desc, "I" as SRCE From
> wininvs  Where stktype=333 GROUP BY stockcode ORDER BY stockcode Into Table
> &myfile


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to