I have created an SQL query that merges duplicates in a table:
SELECT Min([XNbr]) AS [XNbr], [ZNbr], [Hamster], [Cat], [Cow], [Dog],
[Squirrel], [Bird], [Mouse], [Flower], [Tree], Max([TimeStamp]) AS
[TimeStamp]
FROM dbo.Sunshine
GROUP BY [ZNbr], [Hamster], [Cat], [Cow], [Dog], [Squirrel], [Bird],
[Mouse], [Flower], [Tree]
ORDER BY [XNbr]
I now want to extend this query to transfer the result in target table I created before that has the exact structure (same fields and types) of the query above. How can that be done?
INSERT?SELECTINTO. To insert into an existing table, useINSERTSELECT