Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored proc sql server
Message
De
13/10/2004 13:31:57
 
 
À
13/10/2004 12:35:24
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00950845
Message ID:
00951134
Vues:
16
Randy,

I am by no means a SQL expert, so take some of this with a grain of salt. <g>

>how do i declare the table variable?

I already showed you that in my last post (CREATE @TempPriorSales TABLE etc.etc.)

>can i create an identity column on the table variable?

I never tried it, but I don't see why not.

>do i need to create an index on the table variable before i join its results with results from another table?

Probably not (and I don't know if you can, but I never tried this either).

>also, do you see any optimization i could do for my queries? example: is there a way to calculate monthly sales and yearly sales per customer in one data pass?

Here's where I don't have a definitive answer. I usually just play around with queries until I find something that works decently. If I were you, I'd get the queries working first, then I'd work on optimizing them.

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform