Hallo Markus!
Nachdem Du das Script "übernommen" hast, sollte vielleicht geklärt werden, was Du überhaupt abfragen willst.
Für mich sieht es so aus, als möchtest Du lediglich alle Locations, die nicht '' (auch nicht NULL?) und nicht '516' als ID haben.
Wenn meine Vermutung richig ist, probier mal:
SELECT
location.location_id,
location.loc_name
FROM
location
WHERE location.location_id <> ''
AND location.location_id <> '516'
AND location.location_id IS NOT NULL;
Wenn nicht, solltest Du die Frage etwas anders formulieren, da das SQL-Statement als solches ein bisschen misteriös wirkt ;-)
mfg
norbert =:-)