Murray Brown
asked on
SQL Using Date Column in Where without selecting it
Hi
In the following SQL statement I want to take [Performance].[Date] out of the SELECT line and leave it in the WHERE line
but this causes an error
In the following SQL statement I want to take [Performance].[Date] out of the SELECT line and leave it in the WHERE line
but this causes an error
SELECT [Performance].[Date],[Shafts].[Shaft],Sum([Performance].[Drilled Total]) AS Metres,SUM([Shafts].[Target]) As Target
FROM [Performance] Inner Join [Shafts] On [Performance].[Shaft] = [Shafts].[Shaft]
WHERE [Performance].[Date] >= [Shafts].[From] And [Performance].[Date] <= '05 Nov 2015'
GROUP BY [Shafts].[Shaft],[Performance].[Date] ORDER BY [Shafts].[Shaft]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. I hadn't realized that a solution had been given
ASKER
found answer