B
birdman
I have a query that may return several records, but I only want the First record of that query to be selected. How can I do that? I have tried using First but I keep getting an error that one of the other fields is not included. The SQL is below. Thanks for any help.
string varSQL="SELECT birdList.family, birdList.commonName, Photos.photoQuality, Photos.contributor, Identification.idCharacteristics FROM (birdList LEFT JOIN Photos ON birdList.commonName = Photos.commonName) INNER JOIN Identification ON birdList.commonName = Identification.commonName WHERE birdList.commonName=@param and Photos.permission=Yes ORDER BY birdList.family, birdList.commonName, Photos.photoQuality";
string varSQL="SELECT birdList.family, birdList.commonName, Photos.photoQuality, Photos.contributor, Identification.idCharacteristics FROM (birdList LEFT JOIN Photos ON birdList.commonName = Photos.commonName) INNER JOIN Identification ON birdList.commonName = Identification.commonName WHERE birdList.commonName=@param and Photos.permission=Yes ORDER BY birdList.family, birdList.commonName, Photos.photoQuality";