Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do I Create This Procedure?
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
01116731
Message ID:
01116736
Views:
29
See Re: Record ID generator question Thread #605839 Message #611104

>How do I convert this VFP code to a SQL stored procedure:
>
>
>PROCEDURE GetNextId(cKeyName)
>
>LOCAL nRetVal
>nRetVal = 0
>
>SELECT 0
>USE SysKeys
>
>LOCATE FOR KeyName = cKeyName
>
>IF FOUND()
>  nRetVal = SysKeys.Id + 1
>  REPLACE IN SysKeys Id WITH nRetVal NEXT 1
>ENDIF
>
>RETURN nRetVal
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform