Selection of Trigger

macca

Registered User.
Local time
Today, 03:26
Joined
Aug 24, 2005
Messages
16
Can anyone help with this. I have a query called trigger, which has 5 fields as follows

CONTACTID..............INV...............MSP..............SMS..............TRIGGER
456.............................................11......................................MSP
457..........................8...........................................................INV
458.............................................3........................................MSP
459..................................................................6...................SMS

Only 1 field between INV, MSP and SMS in any record will be >0
What I need to do is that if the value in these 3 fields are > then populate TRIGGER with the correct name

Can anyone help
 
Mmm... Perhaps not the best design!

You need an iif statement. Something like this (untested):
Iif(Nz(INV)>0,"INV", iif(Nz(MSP)>0,"MSP",iif(Nz(SMS)>0,"SMS","")))
 

Users who are viewing this thread

Back
Top Bottom