Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

ISNULL within a nested select statement

$
0
0
SQL
(selecttop1IN42.ITEM_NUMBfromIN42joinIN10onIN42.ITEM_NUMB=IN10.ITEM_NUMBwhereIN42.JOB_NUMB=JC10.JOB_NUMBandIN10.SPARE5='A')asITEM_NUMB_SPAREA,(selecttop1IN42.ITEM_NUMBfromIN42joinIN10onIN42.ITEM_NUMB=IN10.ITEM_NUMBwhereIN42.JOB_NUMB=JC10.JOB_NUMBandIN10.SPARE5='B'(ISNULL(IN42.ITEM_NUMB,0)))asITEM_NUMB_SPAREB

I have this piece of code that I am trying to make sure that if an IN42.ITEM_NUMB only has 1 of the 2 records then instead of NULL it will replace it with some text. The issue I encounter is that I can't figure out the syntax for my ISNULL statement. Would it go directly after my select statement?


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>