I\'m trying to set a variable from a SQL query:
declare @ModelID uniqueidentifer Select @ModelID = select modelid from models where areaid = \'South Coast\'
I prefer just setting it from the declare statement
DECLARE @ModelID uniqueidentifer = (SELECT modelid FROM models WHERE areaid = 'South Coast')