I have 2 databases for the same system, but since it's different versions one has additional columns and the other one doesn't. I'm using the same query to pull from both databases.
I am getting an error if I use the query with the extra column to pull from the database that doesn't have it. How could I set it to null if it doesn't have the extra column?
SELECT ID, NAME, DEF_ID FROM VENDOR
The column "DEF_ID" is a new field in the current database. It is returning an error.