yazilim desteni aldigimiz firma sql ile yapti sql bilmiyorum sarulariniza cevap veremem
-----------------------------------cari için-------------------------------------------------------------
USE [ERGEN2009] GO /****** Object: View [dbo].[CASABIT] Script Date: 06/20/2009 18:20:55 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO ALTER VIEW [dbo].[CASABIT] AS SELECT TBLCASABIT.* FROM TBLCASABIT WITH(NOLOCK),NETCONTEXT WHERE (((V$HOLDINGMI=1) OR (TBLCASABIT.ISLETME_KODU IN (-1,V$ISLETME_KODU))) AND ((V$MERKEZMI=1) OR (TBLCASABIT.SUBE_KODU IN (-1,V$SUBE_KODU)))) AND CARI_KOD NOT IN ( SELECT KOD FROM TBLKODHARICHAR DENYL WHERE DENYL.TABLENAME = 'TBLCASABIT' AND DENYL.SUBE_KODU = V$SUBE_KODU) AND
(CARI_KOD NOT IN (SELECT CARI_KOD FROM TBLCASABIT WHERE CARI_TIP = 'S') OR V$NETUSERID NOT IN ('9','12') )
AND ( (V$WORKPLACEVARMI='' OR V$WORKPLACEVARMI IS NULL OR V$WORKPLACEVARMI='H') OR (ONAYTIPI='' OR ONAYTIPI IS NULL OR ONAYTIPI='A') OR ( (ONAYNUM IN (SELECT ONAYNUMARASI FROM TBLWORKFLOWTRA WHERE SUBE_KODU = V$SUBE_KODU AND KULLANICINO = V$NETUSERID AND DURUMU = 'B' AND TBLWORKFLOWTRA.ONAYNUMARASI = ONAYNUM)) AND @@LOCK_TIMEOUT=1000000 AND ONAYTIPI<>'' AND ONAYTIPI IS NOT NULL AND (ONAYTIPI='I' OR ONAYTIPI='U') ) OR (@@LOCK_TIMEOUT<>1000000 AND ONAYTIPI<>'' AND ONAYTIPI IS NOT NULL AND ONAYTIPI = 'U') ) ---------------------------2 çisi---stok hareket----------------------------------------------------------------
ALTER VIEW [dbo].[STHAR] AS SELECT TBLSTHAR.* FROM TBLSTHAR WITH(NOLOCK), TBLSUBELER WITH(NOLOCK),NETCONTEXT WHERE TBLSUBELER.SUBE_KODU = TBLSTHAR.SUBE_KODU AND (( (V$HOLDINGMI=1) OR (TBLSUBELER.ISLETME_KODU IN (-1,V$ISLETME_KODU))) AND ((V$MERKEZMI=1) OR (TBLSTHAR.SUBE_KODU IN (-1,V$SUBE_KODU)))) AND
(INCKEYNO NOT IN (SELECT INCKEYNO FROM TBLSTHAR WHERE STHAR_GCKOD = 'G') OR V$NETUSERID NOT IN ('9','12') ) AND
( (V$WORKPLACEVARMI='' OR V$WORKPLACEVARMI IS NULL OR V$WORKPLACEVARMI='H') OR (ONAYTIPI='' OR ONAYTIPI IS NULL OR ONAYTIPI='A') OR ( (ONAYNUM IN (SELECT ONAYNUMARASI FROM TBLWORKFLOWTRA WHERE SUBE_KODU = V$SUBE_KODU AND KULLANICINO = V$NETUSERID AND DURUMU = 'B' AND TBLWORKFLOWTRA.ONAYNUMARASI = ONAYNUM)) AND @@LOCK_TIMEOUT=1000000 AND ONAYTIPI<>'' AND ONAYTIPI IS NOT NULL AND (ONAYTIPI='I' OR ONAYTIPI='U') ) OR (@@LOCK_TIMEOUT<>1000000 AND ONAYTIPI<>'' AND ONAYTIPI IS NOT NULL AND ONAYTIPI = 'U') )
---------------------3 stok hareket için--------------------------------------
USE [ERGEN2009] GO /****** Object: View [dbo].[STHAR_EKR] Script Date: 06/20/2009 18:06:03 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO ALTER VIEW [dbo].[STHAR_EKR] AS SELECT TBLSTHAR.*, CASE WHEN STHAR_GCKOD ='G' THEN STHAR_GCMIK ELSE 0 END CLC_GIRIS_MIK, CASE WHEN STHAR_GCKOD ='C' THEN STHAR_GCMIK ELSE 0 END CLC_CIKIS_MIK, (CASE WHEN V$ESNEKYAPVARMI='E' THEN DBO.NSF_YAPACIK(TBLSTHAR.YAPKOD,TBLSTOKPARAM.C_YEDEK8,TBLESNYAPMAS.YAPACIK) ELSE NULL END ) CLC_YAPACIK, (CASE WHEN V$ESNEKYAPVARMI='E' THEN DBO.NSF_YAPACIK(TBLSTHAR.MAMYAPKOD,TBLSTOKPARAM.C_YEDEK8,ESNYAPMASMAM.YAPACIK) ELSE NULL END ) CLC_MAMYAPACIK, CASE WHEN TBLSTHAR.STHAR_HTUR IN ('G','H','I','J','K','L','M') AND TBLSTHAR.STHAR_BGTIP <> '' THEN CASE WHEN TBLSTHAR.STHAR_ACIKLAMA ='000000000000000' THEN 'Muht.Müsteri' ELSE ISNULL(TBLCASABIT.CARI_ISIM,STHAR_ACIKLAMA) END ELSE TBLSTHAR.STHAR_ACIKLAMA END CLC_ACIKLAMA FROM TBLSTHAR WITH(NOLOCK) LEFT OUTER JOIN TBLCASABIT WITH(NOLOCK) ON (TBLCASABIT.CARI_KOD=TBLSTHAR.STHAR_ACIKLAMA) LEFT OUTER JOIN TBLESNYAPMAS WITH(NOLOCK) ON (TBLESNYAPMAS.YAPKOD = TBLSTHAR.YAPKOD) LEFT OUTER JOIN TBLESNYAPMAS ESNYAPMASMAM WITH(NOLOCK) ON (ESNYAPMASMAM.YAPKOD = TBLSTHAR.MAMYAPKOD), NETCONTEXT,TBLSUBELER WITH(NOLOCK), TBLSTOKPARAM WITH(NOLOCK) WHERE TBLSUBELER.SUBE_KODU = TBLSTHAR.SUBE_KODU AND (((V$HOLDINGMI=1) OR (TBLSUBELER.ISLETME_KODU IN (-1,V$ISLETME_KODU))) AND ((V$MERKEZMI=1) OR (TBLSTHAR.SUBE_KODU IN (-1,V$SUBE_KODU)))) AND (TBLSTOKPARAM.ISLETME_KODU = V$ISLETME_KODU) AND
(INCKEYNO NOT IN (SELECT INCKEYNO FROM TBLSTHAR WHERE STHAR_GCKOD = 'G') OR V$NETUSERID NOT IN ('9','12') ) AND
( (V$WORKPLACEVARMI='' OR V$WORKPLACEVARMI IS NULL OR V$WORKPLACEVARMI='H') OR (TBLSTHAR.ONAYTIPI='' OR TBLSTHAR.ONAYTIPI IS NULL OR TBLSTHAR.ONAYTIPI='A') OR ( (TBLSTHAR.ONAYNUM IN (SELECT ONAYNUMARASI FROM TBLWORKFLOWTRA WHERE SUBE_KODU = V$SUBE_KODU AND KULLANICINO = V$NETUSERID AND DURUMU = 'B' AND TBLWORKFLOWTRA.ONAYNUMARASI = TBLSTHAR.ONAYNUM)) AND @@LOCK_TIMEOUT=1000000 AND TBLSTHAR.ONAYTIPI<>'' AND TBLSTHAR.ONAYTIPI IS NOT NULL AND (TBLSTHAR.ONAYTIPI='I' OR TBLSTHAR.ONAYTIPI='U') ) OR (@@LOCK_TIMEOUT<>1000000 AND TBLSTHAR.ONAYTIPI<>'' AND TBLSTHAR.ONAYTIPI IS NOT NULL AND TBLSTHAR.ONAYTIPI = 'U') )
------------- Nasrettin hoca eşşekten düşmüş.Bana eşşekten düşmüş birini bulun demiş.Ben düştüm eşşekten.Bildiğim kadar yardım ederim.
|