SPL/SQL Concatenation Operator
Posted in 1993
Hi all, I have a small problem that I am hoping someone can help me with. In SPL you can write the following statements define f_a char(10); define f_b char(10); let f_b = 94100 if f_b[1] != " " then let f_a = f_b[1] end if; if f_b[2] != " " then let f_a = f_a || f_b[2] end if; if f_b[3] != " " then let f_a = f_a || f_b[3] end if; etc For those interested I am trying to write a Procedure that will range postal areas around the world. This is a shortened version to demo the problem. What would be nice is the ability to use a subscript variable but that is not currently possible (at least from my reading of the manual). Getting back the problem trace output gives me the following values for f_a 9 9 4 9 1 9 0 9 0 Now what I need is 9 94 941 9410 94100 Can this be done? In the manual there is an example which has first_name || ""|| last_name which I thought might do it but this has exactly the same results so I am not sure of the reason why this example was given in the manual. Lastly. if you read this far, I would describe what it IS doing as a bug as I would think that 1234567890 1234567890 1234567890 "9 " || 4 is "9 " not "9 4" PS: I would like to get into the SPL thread but I can't do that until I have worked out a fix for the above. Cheers - Jim -------------------------------------------------------------------- Name: Jim Gordon Internet: jgordon@ssf-sys.DHL.COM Company: DHL Systems Inc Phone: (415) 358-5911 (Work) Address: 1700 S. Amphlett Blvd. (415) 882-9728 (Home) San Mateo, CA 94402 Fax: (415) 571-6429 --------------------------------------------------------------------