Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored proc sql server
Message
De
13/10/2004 14:16:06
 
 
À
13/10/2004 13:48:43
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00950845
Message ID:
00951149
Vues:
12
Sorry, Randy ... that was my bad. I meant to type DECLARE not CREATE.

Not sure why you'd get an error on the last SELECT ... what was your error?

Since your query is taking so long, maybe you need to come at it from a different direction. Sometimes I've found that multiple queries are sometimes faster than one big query with lots of JOINs ... but, that's not always the case since SQL Server does a pretty decent job of optimizing when it can. My only suggestion is to continue to play around with various scenarios until you come up with something faster. BTW ... how long is it taking?

~~Bonnie



>I believe I the queries running, but it is taking a very long time for the stored procedure to run. I am still using the temp table instead of the table variable because I was getting the error must define the table variable.
>
>CREATE @TempPriorSales TABLE gave this error, but if I changed it to
>DECLARE @TempPriorSales TABLE it will not error when I create the table variable but when I try to use it in the last select statement of the SP. Either way I couldn't get it to work with the table variable.
>
>I was able to create an identity column on the table variable. I tested just that portion of the SP and it worked.
>
>I haven't had a chance to try an index on the table variable because of the error I was getting.
>
>Again, I appreciate the help. It looks like I still have a long way to go though.
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