Monday, March 26, 2012

Making query in SQL server 2005 - What is the best way?

Hi i am making a web

application using SQL Server 2005. i am trying to make all my query

using stored procedure in database and just passing the parameter to

the database.

I am having some complex task that I can't do in

one query. So what is the best way to make the best performance? Using

complex stored procedure or using more code instead?

Thanks a lot for your help

It sounds like perhaps a temporary table or table variable would be useful. Are you needing to store the results of your 1st query and then process them in a 2nd query (i.e., get a resultset and, for each row, do a calculation/etc)? If so then the temp table solution is available. You can do it all in a single stored procedure.

/****************************************************

Check out our Sql Server 2005 and 2000 tutorials

****************************************************/

No comments:

Post a Comment