Quantcast
Channel: SCN: Message List - SAP SQL Anywhere
Viewing all articles
Browse latest Browse all 2182

Re: Count total and missing in one query

$
0
0

Thanks to all. Here are my test results:


SELECT COUNT(*) as CNT_TOT,

                 (SELECT count(VAR1) from table_name where VAR1 = '""') as CNT1_MISSING

This one works.


SELECT COUNT(*) as CNT_TOT,

                 SUM(IF var1 IS NULL 1 ELSE 0) as CNT1_MISSING

For this one, the syntax is not recognized. It works in SQL server, not in HANA PASS THROUGH.

 



Viewing all articles
Browse latest Browse all 2182

Trending Articles



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