Avatar of thayduck
thayduck
Flag for United States of America asked on

Inner or Left Join

I have a parameter called Tab1or3.
 If this parameter = 9, I want the below to be a Left Join, otherwise leave it as a Inner join.

Can that be done some way ?

INNER JOIN #CreditStatus1 c
                     ON Substring(s.custno, 2, 6) = c.custno
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
thayduck

8/22/2022 - Mon
SOLUTION
slubek

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
thayduck

ASKER
I was trying to avoid doing what you suggest. I thought there might be another way.

It is a big query.
ASKER CERTIFIED SOLUTION
ste5an

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Jim Horn

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
thayduck

ASKER
Thanks for your help.

Slubek, your way will work to.

Jim Horn, you read my mind on your suggestion.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23