Hi,
I am trying to combine two sets of different databases, however, one of my databases does not have a particular field that the other one has, so I would like to input all the data in that field for that database as a null. I am having trouble trying to build that. As you can see OMORCT exists as a field on the AU table but does not exist in the SG table. How can I script this if I want all the fields under OMORCT in the AU table to be blank or null?
SELECT sal.OMAS400, sal.OMPERI, sal.OMCOMP, sal.OMOREF
FROM dbSC.dbo.tbl_SG AS sal
UNION ALL
SELECT sal.OMAS400, sal.OMPERI, sal.OMCOMP, sal.OMOREF, sal.OMORCT
FROM dbSC.dbo.tbl_AU AS sal
Thanks very much in advance for your expertise and any advice on this!!