Steve Schapel
miscellany at mvps.org
Mon Jun 8 03:58:37 CDT 2009
A.D. -------------------------------------------------- > On 8 Jun 2009 at 10:32, A.D.Tejpal wrote: > > ... > The expression works even if all the six fields are blank. This is > because Mid() function, acting upon zero length string, returns a zero > length string without generating error, irrespective of the value of > numerical argument. > ==================================== > SELECT T_Data.*, Mid((","+[F1]) & (","+[F2]) & (","+[F3]) & (","+[F4]) & > (","+[F5]) & (","+[F6]),2) AS MergedValue > FROM T_Data; > ==================================== Just to clarify, as the expression in this example would be Null if all 6 fields were. So, in addition to what you stated, we should also say that the Mid() function returns Null, without error, in such a case. -- Regards Steve __________ Information from ESET Smart Security, version of virus signature database 4136 (20090606) __________ The message was checked by ESET Smart Security. http://www.eset.com