I have the following Query:
select ' ' + noName + ' ' + max(netObject.noType) + ' ' +
case when max(netObject.noIPAddr) IS NULL then '' else max(netObject.noIPAddr) END +
case when max(netObject.noIPAddr_First) IS NULL then '' else max(netObject.noIPAddr_Last) END + ' ' +
case when max(netObject.noNetmask) IS NULL then '' else max(netObject.noNetmask) END + ' ' +
case when max(netObject.noIPAddr_Last) IS NULL then '' else max(netObject.noIPAddr_Last) END
from destination join netObject on destination.noPK = netObject.noPK where destination.rPK = @rulePK group by noName
Which appears to work but gives me the following warning:
Warning: Null value is eliminated by an aggregate or other SET operation.
Perhaps there is a better way to do this anyway? I wanted to use the FIRST() function like in Access, but SQL dosn't have it so I used MAX which seemed to work.
The values that I am MAX() are all strings, and they will always be the same in the query for each noName (noName is unique).