border20
Registered User.
- Local time
- Today, 21:23
- Joined
- Jan 8, 2003
- Messages
- 92
I have a query with 4 fields that can either be null, 0, or a text value like the folowing example:
f1 f2 f3 f4
0 12 0 0
0 0 23 0
3 3 0 0
0 0 65 0
What I want is to be able to have a fifth column with the text value of the row.... example
f1 f2 f3 f4 pos
0 12 0 0 12
0 0 23 0 23
3 3 0 0 3
0 0 65 0 65
I put the folowing code in my query but instead of getting the numerical values I want in the fifth column... I only get #error in the fifth column...
pos : IIF([f1]<>0;[f1];IIF([f2]<>0;[f2];IIF([f3]<>0;[f3];IIF([f4]<>0;[f4];null))))
Someone already suggested replacing the ";"'s with comas but that only does a syntax error while the code I already have doesn't create syntaxe errors,,,
Can anyone help ?
f1 f2 f3 f4
0 12 0 0
0 0 23 0
3 3 0 0
0 0 65 0
What I want is to be able to have a fifth column with the text value of the row.... example
f1 f2 f3 f4 pos
0 12 0 0 12
0 0 23 0 23
3 3 0 0 3
0 0 65 0 65
I put the folowing code in my query but instead of getting the numerical values I want in the fifth column... I only get #error in the fifth column...
pos : IIF([f1]<>0;[f1];IIF([f2]<>0;[f2];IIF([f3]<>0;[f3];IIF([f4]<>0;[f4];null))))
Someone already suggested replacing the ";"'s with comas but that only does a syntax error while the code I already have doesn't create syntaxe errors,,,
Can anyone help ?
Last edited: