Kod: Tümünü seç
declare cur_p_price cursor for SELECT PCK_PCE_PackageID , max(PCK_PCE_WhoMarketID) FROM dbo.GO_PCK_Price
where (dbo.GO_PCK_Price.PCK_PCE_WhoMarketID = @sMarketID OR dbo.GO_PCK_Price.PCK_PCE_WhoMarketID = 0)
and (dbo.GO_PCK_Price.PCK_PCE_PriceDate = @sDepDate)
and (dbo.GO_PCK_Price.PCK_PCE_Single1 > 0)
and PCK_PCE_PackageID in (select PCK_P_ID from GO_PCK_Package where PCK_P_Active = 1 and PCK_P_DepCityID = @sCityID)
group by PCK_PCE_PackageID
yukardaki yapıda @sCityID ve @sMarketID parametre olarak dışardan geliyo birde @sLanguageID parametresi var bu parametre 0 dan büyük gelirse sorguya;
Kod: Tümünü seç
and PCK_P_LanguageID = @sLanguageID