By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,659 Members | 1,611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,659 IT Pros & Developers. It's quick & easy.

SQL Joins or Multiple SELECTS in Procedures

P: 77
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
Share this Question
Share on Google+
3 Replies

Expert 2.5K+
P: 2,878
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

P: 77

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 2.5K+
P: 2,878
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.