Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favourite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved in your SSC briefcase from the favorites tab.
Download now (direct download link)

JOIN technique

By Luigi Marinescu,

I have next tables: Sales, Products, Brands
I want to display all sales for products belonging to a list of brands (Ids) ' ',2,3,5,6,' OR ALL Brands (if this list is empty)

 

Execution sample
exec dbo.sp_JoinTechnique ',2,3,5,6,'

 

So, I've tested on my data and works better than the regular way (maybe because of the indexes) but I want to know your opinions too.

 

Enjoy!

 

Total article views: 2958 | Views in the last 30 days: 7
 
Related Articles
BLOG

Brand <> Reputation?

I was reading a book recently and it equated brand with reputation. My first thought was "aha", that...

ARTICLE

Building Your Brand at Work?

This Friday's poll asks how much you can help yourself while working at your job? Can you build your...

BLOG

Un-SQL Friday: Branding?

Following in Midnight DBA’s more interesting half new blog fest topic. My branding? I don’t have a ...

BLOG

Building YOUR Brand - Part 2

Yesterday I posted Building YOUR Brand that described a formula for becoming rich and famous. Well, ...

BLOG

Branding, my ass! (Un-SQL Friday 001)

Here is my contribution to my blog party, Un-SQL Friday 001: Branding.  Join in the fun, won’t you? ...

Tags
join    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones