Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SPL Problem

Status
Not open for further replies.

stuartd

Programmer
Jan 8, 2001
146
US
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?

 
hai stuartd,

Just declare two variables as char & just take non-initial strings (eg strbatchno=ABC001 )& convert into ascii(strbatchno[4,6]) .so it will contain the numeric .now increment that part only & concat with strbatno.

Hope it works

SCHILLACHE
 
hai,

Here u cast through or concatenate thru' the operater in SPL as ABC,001 like that

SCHILLACHE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top