aşağıdaki fonksiyon ile geriye tablo döndürüyorum sorun yok
Kod: Tümünü seç
CREATE FUNCTION [dbo].[deneme]
(
@gelen_carikodu nvarchar(25),
@ilktarih datetime,
@sontarih datetime,
@tip integer
)
RETURNS TABLE AS
RETURN
(
SELECT * FROM HESAPLAR WITH (NOLOCK)
)
yani
if tip=0 then
select * from hesaplar
if tip=1 then
select * from hesaplar
where kod=153
if tip=2 then
select * from hesaplar
where kod=320