I'm looking to produce the sum of these two select statements:
select sum(amount) as hr from friday.dbo.FMDR_Friday_CSV where [Account #] like 4010
select sum(amount) as hr from friday.dbo.FMDR_Friday_CSV where [Account #] like 4060
I've tried putting a union between them, which only serves to produce the two results in the same results window.
Thanks for any help, I'm an absolute beginner.
In case you want to use multiple selects (maybe if other tables are involved)
select ((select sum(hours) from foo1) +
(select sum(hours) from foo2)) as totalHours
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With