Hi, I am trying 2 sum the total value of 2 columns from seperate tables.
I can get the result if both tables have a value, but if my second table named savedorders has no value then i get no value at all returned.
I tried it with union as well, but could work out how to sum the 2 results at the end.
here is my code so far
SELECT (select SUM(grandtotal) AS Total FROM dbo.savedorders WHERE DATEDIFF (d, orderdate, getdate()) = 0 AND cardvaild ='y') + (SELECT SUM(grandtotal)
WHERE DATEDIFF (d, orderdate, getdate()) = 0 AND cardvaild ='y') as today
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days.
Lets' understand the Au…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed