Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SKIP 1, GO TOP etc aginst a SQL Server from VFP
Message
De
11/10/2000 10:04:06
 
 
À
11/10/2000 00:24:52
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00427178
Message ID:
00427816
Vues:
12
>I'm createing a function that takes three parameters lcAction, lcCurIdKey, lcNewIdKey. lcAction could be TOP, BOTTOM, NEXT, PREV. lcCurIdKey is the idkey I'm currently using and lcNewIdKey is the new idkey that I will use. The stored procedure should first move the record pointer to lcCurIdKey (and this is the part where I want to move the record pointer as fast as possible) and then do a FETCH NEXT or FETCH PRIOR to get the new idkey and return it to me in lcNewIdKey...

I see... not sure what you need this for, since a cursor will do this for you just fine... When I use cursors I generally just include the PK, make it read only, but scrollable... then you can move in your cursor which will give you the id.

Also, to do what you want (generically), how would you know which table to do this to? Anyway, mike showed you how to do this in message #42770, so you should be on your way.

BOb
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform