sahar15125
عضو جدید
سلام لطفاسريعا منو راهنمايي كنين
اشكاله من اينه :
بدست آوردنه مدت مكالمه شخص
بدست آوردنه فاصله مكانيه مبدا و مقصد با توجه به متغيرهاي قبلي
ولي حالا با توجه به مقادير @d,@zaman
ميخوام هزينه ايي رو حساب كنه كه اين پيغامو دريافت مي كنم
Msg 102, Level 15, State 1, Procedure p2, Line 31
Incorrect syntax near '@hazine'.
Msg 102, Level 15, State 1, Procedure p2, Line 33
Incorrect syntax near '@hazine'.
اشكاله من اينه :
declare @a int
declare @v real
declare @c nchar(3)
declare @zaman int
declare @t nchar(3)
declare @d int
declare @hazine int
select @c caller_cel,@t target_cel
from calls
where @x=call#
انتخابه نقطه مبدا و نقطه مقصد از جدول مورد نظرdeclare @v real
declare @c nchar(3)
declare @zaman int
declare @t nchar(3)
declare @d int
declare @hazine int
select @c caller_cel,@t target_cel
from calls
where @x=call#
select @zaman=DATEDIFF(s,begintime,GETDATE())
from calls
where @x=call#
from calls
where @x=call#
بدست آوردنه مدت مكالمه شخص
select @d=dis
from Distance
where (cel1=@c and cel2=@t)
from Distance
where (cel1=@c and cel2=@t)
بدست آوردنه فاصله مكانيه مبدا و مقصد با توجه به متغيرهاي قبلي
ولي حالا با توجه به مقادير @d,@zaman
ميخوام هزينه ايي رو حساب كنه كه اين پيغامو دريافت مي كنم
-- if (@d<200 AND @zaman<15)
-- @hazine=@zaman
-- if(@d>=200 and @d<500 and @zaman<15)
-- @hazine=2*@zaman
-- @hazine=@zaman
-- if(@d>=200 and @d<500 and @zaman<15)
-- @hazine=2*@zaman
Msg 102, Level 15, State 1, Procedure p2, Line 31
Incorrect syntax near '@hazine'.
Msg 102, Level 15, State 1, Procedure p2, Line 33
Incorrect syntax near '@hazine'.