Avatar of MEINMEL
MEINMEL
Flag for United States of America

asked on 

Limit SQL Query results

This SQL query returns 5 records:

select FULLNAME,L_LAXON
from sde.HILLSBOROUGH_POLYLINE
where fullname like '% VARN%' or FULLNAME like 'VARN%'
GROUP BY FULLNAME,L_LAXON

I also want the ObjectID field returned but when I include it in the Select and Group By it increases the number of records returned to 22 and now I have duplicates of the FULLNAME and L_LAXON data.
How can I query for this information and get want I want, which is the 5 records including the OjbectID field.  Thanks!
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
MEINMEL

8/22/2022 - Mon