Hey everyone.
I need some help with a query I am working on
There can be multiple Location numbers at for each location.
Here is an example a data
Loc_Code, Loc_Name, Loc_Number
100000,aaaaaaa, 1
100000,bbbbbbb, 2
100000,ccccccc, 3
200000,Name 1, 1
200000,Name 1, 2
Sometimes the Loc_Number starts at 4 instead of 1 for whatever reason. So i want to query up the first record for each Loc_Code.
I need some help with a query I am working on
Code:
SELECT Loc_Code, Loc_Name, Loc_Number
FROM LOCATIONS
ORDER BY Loc_Code, Loc_Code
There can be multiple Location numbers at for each location.
Here is an example a data
Loc_Code, Loc_Name, Loc_Number
100000,aaaaaaa, 1
100000,bbbbbbb, 2
100000,ccccccc, 3
200000,Name 1, 1
200000,Name 1, 2
Sometimes the Loc_Number starts at 4 instead of 1 for whatever reason. So i want to query up the first record for each Loc_Code.