I am hoping you can come to my rescue with respect to an issue I am having.
My database has buildings; each building is assigned to a property. SO my gbbuilding table has (for example):
And so on.
I have a booking table, which includes a building code. There is a table I need to join to that has several fields in common, but instead of the building code, it has the property code. How the heck do I join these from the SQL statement standpoint?
SQL SELECT *
FROM cmsvbook b LEFT OUTER JOIN cmprovable p
This was how it was written long before I got the view, and might have worked in theory once upon a time. It's now wrong because, for many of my clients these days, the building code and property code can be, and usually are, different. I need to "go through" gbbuilding and swap out the b.building_code for the correct property code that I need.