Pick the column with data in it ??

ccondran08

Registered User.
Local time
Tomorrow, 06:47
Joined
Feb 27, 2014
Messages
58
i have a query with 4 columns of data, in most cases 3 of the columns will have the number zero in there and one column will have one word in there. I'm looking for some 'IIF' statement help to formulate a query that will look at each column to see which column has the word in it and then return that word as the result. Any help would be greatly appreciated :banghead:
 
Text: iif(nz([column1],0) & "" = "0","",[column1]) & iif(nz([column2],0) & "" = "0","",[column2]) & iif(nz([column3],0) & "" = "0","",[column3]) & iif(nz([column4],0) & "" = "0","",[column4])
 
Excellent, works perfectly. Thanks.
 

Users who are viewing this thread

Back
Top Bottom