Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Sum and Having select statement question

$
0
0

I have a table, similar to below, needing the LocName values, having the same date, added together.

I will then delete the Null rows and rename the resulting LocName with the summed value.

StoretCode     LocName        ParName        DateTime           Value

95010-A-9        AB 901_4        On Line         201305160000       1
NULL                AB 905_8        On Line         201305160000       4
95010-A-9        AB 901_4        On Line        201305170000        1
NULL                AB 905_8        On Line        201305170000        4
95010-A-9       AB 901_4        On Line         201305180000        1
NULL                AB 905_8        On Line        201305180000        4 


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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