enverdersin
Yeni Üye
- Katılım
- 8 Şub 2019
- Mesajlar
- 163
- En iyi yanıt
- 0
- Puanları
- 18
- Yaş
- 45
- Konum
- istanbul
- Ad Soyad
- ENVER DERSİN
Aşağıdaki kod ile excelle birden fazla firmanın stoklarla ilgili alanları aktarabilirsiniz.
SELECT 'Firma Adı 1' AS FIRMA,
B.BARCODE,U.CODE BIRIM,U.NAME BIRIMAD,CASE WHEN P.PTYPE=1 THEN P.PRICE END AS SATINALMA FIYAT,CASE WHEN P.PTYPE=2 THEN P.PRICE END AS SATIS FIYAT,* from LG_420_ITEMS I LEFT JOIN LG_420_UNITSETF U ON I.UNITSETREF=U.LOGICALREF LEFT JOIN LG_420_UNITBARCODE B ON I.LOGICALREF=B.BARCODE LEFT JOIN LG_420_PRCLIST P ON P.CARDREF=I.LOGICALREF
UNION ALL
SELECT 'Firma Adı 2' AS FIRMA,
B.BARCODE,U.CODE BIRIM,U.NAME BIRIMAD,CASE WHEN P.PTYPE=1 THEN P.PRICE END AS SATINALMA FIYAT,CASE WHEN P.PTYPE=2 THEN P.PRICE END AS SATIS FIYAT,* from LG_720_ITEMS I LEFT JOIN LG_720_UNITSETF U ON I.UNITSETREF=U.LOGICALREF LEFT JOIN LG_720_UNITBARCODE B ON I.LOGICALREF=B.BARCODE LEFT JOIN LG_720_PRCLIST P ON P.CARDREF=I.LOGICALREF
SELECT 'Firma Adı 1' AS FIRMA,
B.BARCODE,U.CODE BIRIM,U.NAME BIRIMAD,CASE WHEN P.PTYPE=1 THEN P.PRICE END AS SATINALMA FIYAT,CASE WHEN P.PTYPE=2 THEN P.PRICE END AS SATIS FIYAT,* from LG_420_ITEMS I LEFT JOIN LG_420_UNITSETF U ON I.UNITSETREF=U.LOGICALREF LEFT JOIN LG_420_UNITBARCODE B ON I.LOGICALREF=B.BARCODE LEFT JOIN LG_420_PRCLIST P ON P.CARDREF=I.LOGICALREF
UNION ALL
SELECT 'Firma Adı 2' AS FIRMA,
B.BARCODE,U.CODE BIRIM,U.NAME BIRIMAD,CASE WHEN P.PTYPE=1 THEN P.PRICE END AS SATINALMA FIYAT,CASE WHEN P.PTYPE=2 THEN P.PRICE END AS SATIS FIYAT,* from LG_720_ITEMS I LEFT JOIN LG_720_UNITSETF U ON I.UNITSETREF=U.LOGICALREF LEFT JOIN LG_720_UNITBARCODE B ON I.LOGICALREF=B.BARCODE LEFT JOIN LG_720_PRCLIST P ON P.CARDREF=I.LOGICALREF