[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
printing long datatypes
- Subject: printing long datatypes
- From: "C. Willis III" <ceprn@HOTMAIL.COM>
- Date: Tue, 22 Sep 1998 13:18:56 CDT
OS : W-95/NT/Unix(Solaris system V rel 4)
DB : Oracle
DB Version : 7.3
Sqribe Product : sqrw
Sqribe Prod Version : 3.0.1.18
Application : PSoft 7.0
Question / Comment : I have a select of a long datatype field. The data
is in the database like this :
sentencesentencesentencesentencesentencesentencesentence(^M)
(^M)
(^M)
sentencesentencesentencesentencesentence(^M)
(^M)
sentencesentencesentencesentencesentencesentencesentence(^M)
where (^M) is a line feed/return.
What I need to do is strip out all of the (^M) line feeds, concat the
senetences together and then cut them up into bits for printing in the
footer. I figure I can use the substr fxn to cut the finished string
into bits, and probably use the translate function to get rid of the
(^M) line feeds (if I knew what the ascii sequence was for this), but I
am experiencing some difficulties in applying the theory to practice.
Has anyone had any experience doing this?
Code Example :
begin-procedure Select-RKA-Comments
#debug show 'comment typ = ' $Comment_Type
begin-SELECT
COM.DESCR &comm_descr
COM.COMMENTS_2000 &print_comment
#debug show 'description = ' &comm_descr
#debug show 'comment = ' &print_comment
let #comm_len = length(&print_comment)
let $comm_desc = rtrim(&comm_descr, ' ')
let #pos_b = length($comm_desc)
#debug show 'length is = ' #comm_len
#debug show 'no space is = ' #pos_b
do Print-RKA-Comments ! this will do the stripping,
! concatting and printing
! haven't written it yet
FROM PS_STD_COMM_TBL_PO COM
WHERE COM.SETID = &PO.BUSINESS_UNIT
AND COM.STD_COMMENT_TYPE = $Comment_Type
AND COM.EFFDT <= (select max(EFFDT)
from PS_STD_COMM_TBL_PO
WHERE COM.SETID = &PO.BUSINESS_UNIT
AND COM.STD_COMMENT_TYPE = $Comment_Type
AND EFFDT <= SYSDATE)
AND COM.EFF_STATUS = 'A'
end-select
end-procedure ! Select-RKA-Comments
As always, TIA and 'Live Long and Prosper'
clark
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com