Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

when using the "&" operator in the process of exporting to csv files

Status
Not open for further replies.

uscitizen

Technical User
Jan 17, 2003
672
US
my downstream contact needs to see data from my a2k database in a csv file and, in particular, wants to see names as follows: LASTONE^FIRSTONE^MIDINITL

being the inexpert with respect to exporting to csv, i understand you want to start with a query and then redefine your output variables....which brought me to contrive the following: NEWVERSION: ([LASTONE]&"^"&[FIRSTONE]&"^"&[MIDINITL]), which would result in

"Public^John^Q"

when the patient's got a middle initial, but the troublesome looking

"Doe^Mary^"

when the patient doesn't.

any suggestions'd be kind of welcome.

“The philosophy of the school room in one generation will be the philosophy of government in the next." --- Abraham Lincoln
 
Have you tried this:

NEWVERSION: IIf(IsNull([MIDINITL])OR [MIDINITL]="",([LASTONE]&"^"&[FIRSTONE]),([LASTONE]&"^"&[FIRSTONE]&"^"&[MIDINITL]))

HTH
Mike

[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top