Merhaba Arkadaşlar;
Ben aşağıdaki gibi alınan faturalarla ilgili bir rapor yapayım dedim ama faturanın içindeki açıklama kısmını getiremedim.Ayrıca TC NO ve Vergi No'yu yanyana getirdim. ikisini tekbir alanda yazıp vergi nosu yoksa tc no'yu getirsin , Tc no yoksa vergi no'yu getirsin diye bir şey yapabilirmiyim.
SELECT dbo.LG_086_01_INVOICE.DATE_ AS TARIH, dbo.LG_086_01_INVOICE.DOCODE AS [BELGE NO], dbo.LG_086_CLCARD.DEFINITION_ AS [SATICI UNVANI],
dbo.LG_086_CLCARD.TCKNO AS [TC NO], dbo.LG_086_CLCARD.TAXNR AS [VERGI NO], dbo.LG_086_01_STLINE.AMOUNT AS MIKTAR,
dbo.LG_086_01_INVOICE.GROSSTOTAL AS [KDV HARIC TUTAR], dbo.LG_086_01_INVOICE.TOTALVAT AS KDV, dbo.LG_086_01_STLINE.LINEEXP
FROM dbo.LG_086_CLCARD INNER JOIN
dbo.LG_086_01_INVOICE ON dbo.LG_086_CLCARD.LOGICALREF = dbo.LG_086_01_INVOICE.CLIENTREF INNER JOIN
dbo.LG_086_01_STLINE ON dbo.LG_086_01_INVOICE.LOGICALREF = dbo.LG_086_01_STLINE.INVOICEREF INNER JOIN
dbo.LG_086_ITEMS ON dbo.LG_086_01_STLINE.STOCKREF = dbo.LG_086_ITEMS.LOGICALREF
WHERE (dbo.LG_086_01_INVOICE.GRPCODE = 1)
Şimdiden herkese teşekkür ederim.