troubleshooting Question

One field reference in a view result for two different tables

Avatar of Amanda Walshaw
Amanda WalshawFlag for Australia asked on
Microsoft SQL ServerMicrosoft SQL Server 2008SQL
4 Comments1 Solution427 ViewsLast Modified:
I have written a view which shows all the results depending on the description type then shows the reference number, it is displaying correctly but how can I just show the result in the same column ie as CemCRem ref (without referring to burial or cremation)

--Cremation or Burial details
case k.Description when 'White' then  j.BOOKINGNO end AS [Reference White],
case k.Description when 'Black' then f.BOOKINGNO end AS [Reference Black],
Note the booking reference comes from different tables.  but in the view I want to show it as one field in the view as 'Reference' not Reference White Reference Black

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros