Yes... Use IsNull() This changes your example as follows:
SELECT U.userID, U.userFirstName, U.userMiddleName, U.userLastName, (U.userFirstName + SPACE(1) + IsNull(U.userMiddleName + SPACE(1), "") + U.userLastName) AS assignedName FROM a_Table Greetings / GrĂ¼sse Gert Franz Customer Care Railo Technologies GmbH [EMAIL PROTECTED] www.railo.ch Join our Mailing List / Treten Sie unserer Mailingliste bei: deutsch: http://de.groups.yahoo.com/group/railo/ english: http://groups.yahoo.com/group/railo_talk/ Mark Leder schrieb: > I'm using this cfquery to pull records from an MSSQL 2005 db: > > SELECT U.userID, U.userFirstName, U.userMiddleName, U.userLastName, > (U.userFirstName + SPACE(1) + U.userMiddleName + SPACE(1) + U.userLastName) > AS assignedName > FROM a_Table > > It works great, with one exception. In some cases, the U.userMiddleName > datafield is a NULL value. When that occurs, the entire "assignedName" > alias is NULL for that record row, not just inserting an empty space between > the first and last names as I would expect. When all three datafields > (first,middle,last) have values, a valid "assignedName" is returned. Is > there a workaround? > > Thanks, > Mark > > > [This E-mail scanned for viruses by Declude EVA] > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263918 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

