Stoklara ait seri numaralarının hangi cariye hangi belge no ile verildiğini görüntülemek
SELECT dbo.TBLSERITRA.SERI_NO, dbo.TBLSERITRA.STOK_KODU, dbo.TBLSTSABIT.STOK_ADI, dbo.TBLSERITRA.TARIH, dbo.TBLSERITRA.BELGENO,
dbo.TBLSERITRA.HARACIK AS CARI_KOD,
(SELECT CARI_ISIM
FROM dbo.TBLCASABIT
WHERE (CARI_KOD = dbo.TBLSERITRA.HARACIK)) AS CARI_ADI, dbo.TBLSERITRA.DEPOKOD, dbo.TBLSERITRA.GCKOD, CAST
((SELECT STHAR_NF * (1 + STHAR_KDV / 100) AS Expr1
FROM dbo.TBLSTHAR
WHERE (INCKEYNO = dbo.TBLSERITRA.STRA_INC)) AS decimal(18, 2)) AS fiyat, CAST
((SELECT STHAR_DOVFIAT * (1 + STHAR_KDV / 100) AS Expr1
FROM dbo.TBLSTHAR
WHERE (INCKEYNO = dbo.TBLSERITRA.STRA_INC)) AS decimal(18, 2)) AS döviz
FROM dbo.TBLSERITRA INNER JOIN
dbo.TBLSTSABIT ON dbo.TBLSERITRA.STOK_KODU = dbo.TBLSTSABIT.STOK_KODU