Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Do I Create This Procedure?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
01116731
Message ID:
01116736
Vues:
31
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform