Untitled
unknown
plain_text
3 years ago
676 B
10
Indexable
declare @BaslangicTarihi datetime declare @BitisTarihi datetime declare @FirmaId uniqueidentifier set @BaslangicTarihi='2015-01-23' set @BitisTarihi='2016-08-24' set @FirmaId='121CBFD9-828B-44F8-99FE-41B6E6C6D235' select fc.FirmId, fc.FoodRegistryStartDate as Baslangic, fc.FoodRegistryEndDate as Bitis from usks.FirmCodes as fc with(nolock) inner join usks.SupplyContract as sc with(nolock) on fc.FirmId=sc.FirmId where fc.Deleted=0 and sc.Deleted=0 and (fc.FirmId=@FirmaId) and (@BaslangicTarihi between fc.FoodRegistryStartDate and fc.FoodRegistryEndDate) and (fc.FoodRegistryEndDate is null or (@BitisTarihi between fc.FoodRegistryStartDate and fc.FoodRegistryEndDate))
Editor is loading...