Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sp return X times 2
Message
De
04/05/1999 15:05:26
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Sp return X times 2
Divers
Thread ID:
00215097
Message ID:
00215097
Vues:
75
I have a sp called from VFP that is supposed to return the next voucher number and next check number from 2 different tables in our accounting system.

I use identical methods for accessing both tables. The problem I'm having is that while the voucher incrementing works perfectly, the check number is returning every other number. The section for checks is as follows:

/* Get Checkbook Account from Checkbook master file */
UPDATE checkfile
SET @cCheckNo = nxtchnum, @nCheckBkActId = actindx,
nxtchnum = LTRIM(STR(CONVERT(int, nxtchnum) + 1))
WHERE chekbkid = @cCheckBkId


The really odd thing is that if I rearrange the code to have the increment as the 1st part of the set, the next time I run the code it will increment by 1. The 2nd time it will increment by 2 again.

Any help appreciated,

PF

(On an infant's shirt): Already smarter than Bush
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform