Larry Brister
asked on
SQL Server view
Not sure if this is "so-able."
I have three tables with sales information in them.
Each table has a "cust_no" field, year, sales.
How do I write a view that has
Customer TY Sales SalesYR-1 SalesYR-2
1 200 100 0
2 0 200 0
I have three tables with sales information in them.
Each table has a "cust_no" field, year, sales.
How do I write a view that has
Customer TY Sales SalesYR-1 SalesYR-2
1 200 100 0
2 0 200 0
ASKER
gnar:
The cust_no doesn't exist in all tables. I need have a column that has all the cust_no's whatever table they're in and then place a zero dollars in the sales part where they don't exist.
The cust_no doesn't exist in all tables. I need have a column that has all the cust_no's whatever table they're in and then place a zero dollars in the sales part where they don't exist.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
WOW! Excellent script. Thanks and I'm on my way!
Something like:
Open in new window