Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need some advice
Message
De
23/03/2000 17:17:09
 
 
À
23/03/2000 09:13:35
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00348846
Message ID:
00349703
Vues:
30
>The query sp did run with correct results.
>Microsoft has room for imperfect like me.

I'm really surprised.

>
>UPDATE #db_ledger SET balance =
> (SELECT SUM(glamnt) FROM #db_ledger d WHERE d.gldt < #db_ledger.gldt)
>
>There can be more than one record on same day so the update function I think may not work.

As long as the time component is included in gldt, there shouldn't be a problem.

>Does the extra update for the balance have any overhead over the query time.
>(How much overhead for 10000 records approx.) How can I measure it.
>
>Is there any other way to frame the same query without the temp table & can the balance updation be set as a contraint over the table.

There are no constraint that provides a means to maintain calculated data. You could do it with a trigger but you still must have a way to serialize the transaction records.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform