日期:2014-05-16 浏览次数:20409 次
Select [INVOICE].[Invoice No],[PAID].[Invoice Data],”SALES:”+Category+” - ”+Content as Detail,[Inv] inner join orders on [INVOICE].[Invoice No]= [PAID].[Invoice Data] order by [Invoice Data]
SELECT
[INVOICE].[Invoice No],[PAID].[Invoice Data],'SALES:'+Category+' - '+Content as Detail,[Inv] FROM 表名
inner join orders on
[INVOICE].[Invoice No]= [PAID].[Invoice Data]
order by
[Invoice Data]
select * from
(
select [Invoice No], [Invoice Date], 'SALES: '+ Category + '-' + Content as Detail, Amount as Inv, 0 as Pay
from Invoice
union all
select [Receipt No] as [Invoice No], [Receipt Date] as [Invoice Data], 'PAID: '+ [Invoice No] + ' BY ' + [Paid By] as Detail, 0 as Inv, Amount as Pay
from Paid
) a
order by [Invoice Date]