iran-omid
یک شنبه 02 اسفند 1388, 10:02 صبح
سلام دوستان
میخواستم ببینم کد زیر چه ایرادی داره که دائم به من خطای If میده؟
Create FUNCTION [dbo].[CheckSiance](@Id int)
RETURNS TABLE
AS
RETURN
if @Id=0
select Name from Salon where siance1=0
else if @Id=1
select Name from Salon where siance2=0
else if @Id=2
select Name from Salon where siance3=0
میخواستم ببینم کد زیر چه ایرادی داره که دائم به من خطای If میده؟
Create FUNCTION [dbo].[CheckSiance](@Id int)
RETURNS TABLE
AS
RETURN
if @Id=0
select Name from Salon where siance1=0
else if @Id=1
select Name from Salon where siance2=0
else if @Id=2
select Name from Salon where siance3=0