-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Hiren Patel
Message 1 in Discussion
Dear all,
I have create cursor within procedure it sucessfully gets compile but when i
place the same code in function
gives error "Mixing old and new syntax to specify cursor options is not
allowed."
how should i solve this error the cursor is as below
--------------
CREATE FUNCTION IsAuthorised (@ApplnNo numeric(9), @TrnsRepType varchar
(3),@UserId varchar(25))
RETURNS bit AS
BEGIN
-- <function_body, , RETURN @p1 + @p2 >
-- eg.
DECLARE @i numeric(4),
@ApplnStats AS varchar(3),
@ApplnCd AS varchar(3),
@AplnNo AS numeric(9),
@StatsDt AS datetime
select @i=0
declare cur scroll cursor for select
APPLN_NO,APPLN_CD,APPLN_STATS,max(APPLN_STATS_DT) from H_APPLN_STATS
where
[EMAIL PROTECTED] and
[EMAIL PROTECTED] and
[EMAIL PROTECTED]
group by APPLN_NO,APPLN_CD,APPLN_STATS
open cur
-- Fetch Next From Cur Into @AplnNo,@ApplnCd,@ApplnStats,@StatsDt
Fetch Cur Into @AplnNo,@ApplnCd,@ApplnStats,@StatsDt
If (@@FETCH_STATUS = -1 )
Begin
Close Cur
Deallocate Cur
Goto FindData
End
WHILE(@@FETCH_STATUS = 0)
BEGIN
select @[EMAIL PROTECTED] + 1
Fetch Cur Into @AplnNo,@ApplnCd,@ApplnStats,@StatsDt
end
finddata:
Close Cur
Deallocate Cur
RETURN true
END
GO
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]