I have to upload various tables(xlsx files) and join them together via a query. I,e upload table A1, and join it with A2, A3.....etc.
Can I make it such that my query is dynamic enough to ignore join statements if my table does not have certain columns.
For example, uploading table A1, A2, A3, I might join them with primary Key "ID" and 'name'. However, if I upload table B1, B2, B3, it might not have Primary Key "name."
So I want to have a query that has all the join staements for name and ID, but be able to ignore the 'name' join if these columns aren't available.
... View more