I want to return a MySQL result set even when no rows are found that simulates the correct result set with default values.
This is so I don't have to have any logic in my display of this data... I can just push it out.
What I would like to do is always return 3 Warehouses... 000 CAL RET with values of 0 when nothing is found.
If a new warehouse is ever added I would hopefully be able to modify this to include that warehouse also.
Here goes:
http://sqlfiddle.com/#!9/e94bc
I would want to return another row for RET warehouse with zeros in all columns.
If you query another ItemCode that doesn't exist, I want to see all 3 rows 000 CAL RET with zero values in each column.
as a bonus I would also like to always return 0 and not (NULL) as a value.
I have searched for answers, but can't seem to find exactly what I need.
Thanks!