Check out the IFNULL function. This was a great addition a few years back.
(IFNULL(arg1,arg2,arg3))
If arg1 is null, then the value of arg2 is returned. If arg1 is not null, the the value of arg3 is returned.
| [EMAIL PROTECTED]
Sent by: [email protected] 05/04/2005 01:58 PM
|
|
Our database has 1 column for the 5 digit zipcode and 1 column for the 4 digit extension. The 4 digit extension is sometimes blank - unknown. I have been printing mail lables with these two columns separated by a space. Our local post office has informed us that this is not acceptable for their scanning equipment. There must be a hyphen between the two when both are present. Of course this is easy, except when the 4 digit extension is blank, then the hyphen should not be present.
Can I use a variable _expression_ for this?

