I am kind of new to writing sql queries. I am sure this is a very basic question.
How do I return the first value of a field when using a Group by clause. If I link the SQL tables to Access I am able to run the query:
SELECT tblName.Field1, First(tblName.Field2) AS ID
FROM tblName
GROUP BY tblName.Field1;
When I try to use this same query in SQL, I get an error saying First is not a recognized function name.
Can anyone please tell me how to accomplish this.
Thanks in advance for your help.
How do I return the first value of a field when using a Group by clause. If I link the SQL tables to Access I am able to run the query:
SELECT tblName.Field1, First(tblName.Field2) AS ID
FROM tblName
GROUP BY tblName.Field1;
When I try to use this same query in SQL, I get an error saying First is not a recognized function name.
Can anyone please tell me how to accomplish this.
Thanks in advance for your help.