October 23, 2017 at 7:55 am
Hi,
I need some help with a query. In the picture you see three tables.
I want all rows in tblSales and ProdDesc from tblProctAttributes.
The problem I am running into is, if there is no record in ProductAttributes which corresponds to tblProducts.ProductSKU then the tblSales row gets filtered out. does anyone know a way around this?
Thanks
October 23, 2017 at 8:10 am
Instead of using a JOIN, try using a LEFT JOIN to your tblproductAttributes.
If you want a more in depth answer (with an example), have a look at the link in my signature, that explains how to post T-SQL questions. 🙂
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
October 24, 2017 at 1:40 pm
progmgppers - Monday, October 23, 2017 7:55 AMHi,
I need some help with a query. In the picture you see three tables.
I want all rows in tblSales and ProdDesc from tblProctAttributes.
The problem I am running into is, if there is no record in ProductAttributes which corresponds to tblProducts.ProductSKU then the tblSales row gets filtered out. does anyone know a way around this?
Thanks
The query designer produces ugly code and it's useless if you want to do anything complex. You're better off learning to just write out your code by hand.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 24, 2017 at 3:56 pm
drew.allen - Tuesday, October 24, 2017 1:40 PMprogmgppers - Monday, October 23, 2017 7:55 AMHi,
I need some help with a query. In the picture you see three tables.
I want all rows in tblSales and ProdDesc from tblProctAttributes.
The problem I am running into is, if there is no record in ProductAttributes which corresponds to tblProducts.ProductSKU then the tblSales row gets filtered out. does anyone know a way around this?
ThanksThe query designer produces ugly code and it's useless if you want to do anything complex. You're better off learning to just write out your code by hand.
Drew
Co-worker of mine is just now learning this himself.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply