This is a copy of a query which is called once my Union query is been run. There are another 7 such queries all linked to the one Union, where the queries filter for certain details and if req will multiply the "Qty" Field in order to increase this. They are then Appended to a Table once the Union query is complete. All the queries pull their data from one Table "tblTicker2". This Table contains around 200,000 records and will continue to rise, with 17 Fields. I need these Fields as they are all unique to each ind records, so would not be able to split them out to another Table.
SELECT tblMembers.Member, [Seller Firm] AS Firm, [Seller Trader] AS Trader, "S" AS [B/S], Contract, 0 AS Bid, IIf(IsNull(Sum([Qty])),0,Sum([Qty])) AS Offer, Qty, Price, [Buyer Trader], [Buyer Firm], [Seller Firm], [Seller Trader], [Time(text)], Time, Sale, Date, Left([Contract],3) AS Metal,TickerID, IIf([Sale]="S","No","Yes") AS Instigator, [Buyer Firm] AS Counterparty, Carry, Comments
FROM tblTicker2 INNER JOIN tblMembers ON tblTicker2.[Seller Firm] = tblMembers.MemberID
GROUP BY tblMembers.Member, [Seller Firm], [Seller Trader], Contract, Qty, Price, [Buyer Trader], [Buyer Firm], [Time(text)], Time, Sale, Date, Left([Contract],3), TickerID, [Buyer Firm], [Carry], Comments
HAVING Contract Like "???3M"
Any help given would be appreciated as I am new to SQL and VBA, and starting to push myself a bit on the Access front-end in order to improve what I have on my databases.[/size=6]
Tony[/font=Arial]
|