Hello, I am trying to convert from an Access macro to a stored procedure in SQL 2000 I have two queries
I would like to have only one query, however I do not know how to handle the criteria for the date.
Does this just have to be two queries? Can a CASE statement be used?
Thank you,
djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!
Code:
SELECT
myGroup
, Sum(myAmount) AS SumAMT
FROM myTable
GROUP BY myGroup
SELECT
myGroup
, Max(myDate) AS MaxDATE
FROM myTable
WHERE mySource IN ('abc', 'def')
GROUP BY myGroup
Does this just have to be two queries? Can a CASE statement be used?
Thank you,
djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!