SPL problems
Posted in 2001
Topics: Stored Procedures & SPL
I have defined iBatchno INTEGER and strBatch CHAR(6) variables I can SELECT INTO iBatchno FROM table Now i need to make a string of format : "ABC" || iBatchno I can not CAST(iBatchno AS CHAR(6)) I also can not LET strBatch = "ABC" || iBatchno How do I cast an INT to a CHAR, and how do I concat 2 strings into a varaible?
"Stuart" <stuartd@ctsnet.co.uk> writes: > I have defined iBatchno INTEGER and strBatch CHAR(6) variables > I can SELECT INTO iBatchno FROM table > > Now i need to make a string of format : "ABC" || iBatchno > > I can not CAST(iBatchno AS CHAR(6)) > I also can not LET strBatch = "ABC" || iBatchno > > How do I cast an INT to a CHAR, and how do I concat 2 strings into a > varaible? Have you read the manual(s)? As far as I can remember, it's pretty clear on both your questions. Thomas
Assign iBatchno to a CHAR variable then concatenate that to "ABC". Art S. Kagel Stuart wrote: > > I have defined iBatchno INTEGER and strBatch CHAR(6) variables > I can SELECT INTO iBatchno FROM table > > Now i need to make a string of format : "ABC" || iBatchno > > I can not CAST(iBatchno AS CHAR(6)) > I also can not LET strBatch = "ABC" || iBatchno > > How do I cast an INT to a CHAR, and how do I concat 2 strings into a > varaible?