Everything you need to know about backup and disaster recovery with AWS, for FREE!
select Base.CASENO as [Matter Number], INVOICES.INV_NO as [Invoice Number], sum(INVTRANS.TRANS_AMT) as [Total Fees], ISNULL(INVTRANS.TRANS_HOURS, '') as [Units], CASE WHEN INVTRANS.TRANS_HOURS IS NULL THEN 0 WHEN INVTRANS.TRANS_HOURS = 0 THEN 0 ELSE INVTRANS.TRANS_AMT/INVTRANS.TRANS_HOURS END as [Rate], INVTRANS.TRANS_AMT as [Item Total], INVTRANS.INVTRANS_ID from INVTRANS inner join INVOICES on INVTRANS.INVOICE_ID = INVOICES.INVOICE_ID left outer join BASE on INVTRANS.MATTER_ID = BASE.MATTER_ID group by base.CASENO, invoices.INV_NO, INVTRANS.TRANS_HOURS, INVTRANS.TRANS_AMT, INVTRANS.INVTRANS_ID order by 2, 1
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|sql query help||15||54|
|SQL Server Express automatically execute SQL or SP||8||34|
|Finding Where Clause Value in SQL Views and SP||21||41|
|SQL Server remove line breaks and tabbed||2||6|