errorIncorrect syntax near 'NULL'. (select 'false' as shortlistbasketid,0 as customAvailable,[County/Department] as cd,latitude,longitude,isnull(externalimageurl,'/layout/noimg.jpg') as externalimageurl,address1,address2,postcode,description,provider,[hotel id] as a1,a2,a3,a4,a5,a6,a7,[hotel id] as HotelId,establishmentname,town, 0 as proxdistance ,case when ourrank = 0 then 'N/A' else cast(ourrank as varchar(30)) end as vOurRank,t1,t2,t3,t4,t5,t6,t7,t1 as total,1 as availorderstr,1 as noofnight,homehyperlinkbo,homehyperlinklr,homehyperlinkhb,homehyperlinkev,bookingcomid,lateroomsid,eviivoid,hostelbookersid,homehyperlink,status,[rooms from] as roomprice,source,0,0,[ourrank] from #TEMP left join COUK_BestPrice on #TEMP.[hotel id] = COUK_BestPrice.hotelid where [hotel id] = 'BNB19130' UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL-- yohl') order by proxdistance OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY