[AccessD] Remove extra characters concatenate

Neal Kling nkling at co.montgomery.ny.us
Fri Feb 7 10:48:00 CST 2003


Here's a cleaner way with out the overhead of the Iif() statement:
 
 
(RequestorName + " / ") & BadgeNumber
 
Here's how it works: if RequestorName has a name the + operator will
concatenate it like a string.  If RequestorName is Null the + operator
will treat it as a numeric value.  Anything added to Null is Null so all
you'll get is the BadgeNumber.

Neal Kling 


-----Original Message-----
From: Wortz, Charles [mailto:CWortz at tea.state.tx.us]
Sent: Friday, February 07, 2003 11:37 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Remove extra characters concatenate


NameBadge:
=IIF(IsNull(RequestorName),BadgeNumber,RequestorName&"/"&BadgeNumber)
 
 

Charles Wortz 
Software Development Division 
Texas Education Agency 
1701 N. Congress Ave 
Austin, TX 78701-1494 
512-463-9493 
CWortz at tea.state.tx.us 
(SELECT * FROM users WHERE clue > 0) 

-----Original Message-----
From: Hollis,Virginia [mailto:HollisVJ at pgdp.usec.com] 
Sent: Friday 2003 Feb 07 10:31
To: 'accessd at databaseadvisors.com'
Subject: [AccessD] Remove extra characters concatenate



I am concatenating two fields Name / badge for a report, this is done in
the query.
 
RequestorName&" / "&BadgeNumber
 
In reports if the requestor is Null, I do not want the slash between the
name & badge number to show. How can I have the / not show for null
requestors?
 
Virginia




More information about the AccessD mailing list