Good morning,
I have 2 queries (see below) and would like either one to work.
Basically, I need 1 field, and if this has no data in it, I need the second field instead. Can someone help please?
select * from openquery(sosprogress, 'SELECT cl-code, a-name, a-full-address, IsNull(Contact1, Contact2) FROM clidb')
select * from openquery(sosprogress, 'SELECT cl-code, a-name, a-full-address, Coalesce(Contact1, Contact2) FROM clidb')
Thanks,
Wayne.
I have 2 queries (see below) and would like either one to work.
Basically, I need 1 field, and if this has no data in it, I need the second field instead. Can someone help please?
select * from openquery(sosprogress, 'SELECT cl-code, a-name, a-full-address, IsNull(Contact1, Contact2) FROM clidb')
select * from openquery(sosprogress, 'SELECT cl-code, a-name, a-full-address, Coalesce(Contact1, Contact2) FROM clidb')
Thanks,
Wayne.