Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!csus.edu!ucdavis!csusac!unify!dbrus!dxs From: dxs@dbrus.Unify.Com (Dale R. Shaver) Newsgroups: comp.databases Subject: Re: UNIFY RPT bug concatenating strings Keywords: UNIFY U2000 RPT Message-ID: <1p2ytsu@Unify.Com> Date: 20 Nov 90 20:06:07 GMT References: <321@cti1.UUCP> Sender: news@Unify.Com (news admin) Organization: Unify Corporation, Sacramento, CA, USA Lines: 77 In article <321@cti1.UUCP> kmeek@cti1.UUCP (Kevin Meek) writes: >When concatenating strings together if any of the fields in the input >are null then resulting output string is set to null as well. > >For example. >with input section like the following > >input > fname [string 2], > lname [string 4], > room [string 3] > >And Data like the following > >John|Smith|100 >John|Smith| >John||103 >|Smith|102 > >the following set statement will set result_str to null for all >but the first line of input. > > set result_str to fname + lname + room > >Basically If any of the variables are null when concatenating strings >the result will be null as well. > >I am using RPT that came with Accell/IDS for our 3B2/600 >The output of RPT -version is below > >Database Version: 34 >Revision: 1.1.1.4.8 >Nap Option: POLL >Machine: ATT 3B2 >Operating System: att600g 3.2.2 3 3B2 >(SM:22 DB:1 CM:10 FM:26 LM:17 TM:16 CL:3) This is ACCELL/SQL, not ACCELL/IDS. This issue is known here at Unify, but the problem is not quite as Kevin has stated. It is true that RPT will set a value to NULL if one or more of the elements is NULL. This is true whether the values are strings, numerics, amounts, etc. However, this is the way in which the RPT product works; in other words, a feature. However, the bug here is that strings of length zero are being interpreted as NULL when they should not be. Given the input that Kevin supplied: John|Smith|100 John|Smith| John||103 |Smith|102 The variable result_str should successively be: JohnSmith100 JohnSmith John103 Smith102 If the input was, however: John|Smith|100 John|Smith|* John|*|103 *|Smith|102 Then the concatenation of the last three strings will be NULL, and is correct. The "strings of length zero being interpreted as NULL" problem has been identified and fixed in our 1.2 version of ACCELL/SQL. Dale Shaver, Technical Support Engineer Phone: (916) 922-1177, x 733 Unify Corporation, Sacramento, California Fax: (916) 920-5306 dxs@unify.Com or {{ucdavis,csun,lll-crg}!csusac,pyramid,sequent}!unify!dxs "Would you please continue the petty bickering; I find it quite intriguing"