UPDATE E SET E.bid = (SELECT TOP 1 IntBd FROM TblB WHERE ltrim(rtrim(BName)) like LTRIM(RTRIM(E.[BName]))+'%')FROM #TmpFile E
hi on the above update how i can insert 0 values instead of nullon #TmpFile table (temp) how i can set 0can i use select CASE WHEN ISNULL((SELECT TOP 1 IntBd FROM TblB WHERE ltrim(rtrim(BName)) like LTRIM(RTRIM(E.[BName]))+'%'),0)
but it give me an error , whn above query(inner) will not return any records if i try select isnull(null,0) it return 0 but why not in my queryhow i can madify ithelp me