Hi Friends,
I was wondering what would be the best way to insert O's into the field number of items sold for products that have no sales using a temporary table or iTVF to use in a Report or application. Thanks !
Use
SELECT ItemNo = ISNULL(ItemNo,0)
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
October 22, 2019 at 2:58 pm
Is the report not able to do a LEFT JOIN instead of an INNER JOIN? That would be the standard way to do that, without having to create a dummy table(s).
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
October 22, 2019 at 3:11 pm
Just use an outer join to the Products table.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply