Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all articles
Browse latest Browse all 2677

SQL: How to display "NULL" values

$
0
0

Can anyone show me how to display a "NULL" value from the SQL Query below?

 

I am trying to pivot some data on the details page and would for the "cpname" column to display "null" or blank if no data is entered.

 

What I'm trying to do is create a pivot table that will consist of 20+ custom properties, and I want the user to see which ones are blank so that they can update it.

 

Thanks much!

 

SELECT

cpName, cpValue

FROM

(

Select

convert(varchar(50), [APPCI_CODE]) as [GMDM App Code]

,convert(varchar(50), [APPCI_NAME]) as [GMDM App Name]

,convert(varchar(50), [APPCI_CBU]) as [CBU]

 

FROM nodescustomproperties

Where NodeID = ${NodeID}

) as ncp

unpivot

(

cpValue FOR cpname IN (

[GMDM App Code]

,[GMDM App Name]

,[CBU]

 

)

) as unpvt


Viewing all articles
Browse latest Browse all 2677

Trending Articles



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