467,915 Members | 1,283 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

SQL Joins or Multiple SELECTS in Procedures

I have to either Join 4 tables, or retrieve one column from 3 tables, and one record from another.

I can use a stored procedure to do the JOINs (doing that now), but it seems like overkill if I need one or two columns from each of the other tables.

Alternatively, I could use OUTPUT parameters and do separate SELECT statements for each Table.

Just looking for advice on making this process more performant.

Sep 22 '08 #1
  • viewed: 1260
3 Replies
Expert 2GB
If you need to have some dynamic filtering, meaning a WHERE ColumnName = @VariableName, a table-function might the one you need. If it's a pretty much fixed SELECT, use views.

--- CK
Sep 22 '08 #2

Thanks for the help. One more question for you, if you have a moment. Would it be more performant to call a stored procedure 12 - 24 times or send 12-24 lines of INSERTs at the Command Text from my ASP.NET application?
Sep 22 '08 #3
Expert 2GB
Depending on what you're stored proc would be doing.

What are you trying to do?

-- CK
Sep 22 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Prem | last post: by
4 posts views Thread by Rob Morris | last post: by
9 posts views Thread by Ed_No_Spam_Please_Weber | last post: by
reply views Thread by DG | last post: by
45 posts views Thread by John | last post: by
4 posts views Thread by Chris | last post: by
2 posts views Thread by narendra vuradi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.