[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
lpad ltrim rtrim questions
Could someone explain to me what RTrim(LTrim($Original, ''''), '''') does?
I'm thinking it may help me in a situation where I am trying to 'right justify'
some fields, some of which are char, some numeric, some with edit masks, some
without.
The SQRUG had great suggestions for my earlier post, but I'm finding that this
mix of fields is still outputting 'not lined up' (I tried lpad, I tried turning
all to_char, but to no avail).
Also, with lpad, do I HAVE to identify a character to pad with? I'd like to use
'space' but I get errors calling for a symbol (.,_-= etc).
My code:
print 'Batch Number:' (+2,1)
let $lpad = lpad($BatchNbr ,25,'.')
print $lpad (,20)
print 'Account Number:' (,40)
let $lpad = lpad(&ACCT_NUM ,25,'.')
print $lpad (,60) !edit XXXXXXXXXX
print 'First Check Number:' (+1,1)
let $lpad = lpad(&MINIDREF ,25,'.')
print $lpad (,20) !edit 999999999
print 'Last Check Number:' (+1,1)
let $lpad = lpad(&MAXIDREF ,25,'.')
print $lpad (,20) !edit 999999999
print 'Total Items Issued:' (+1,1)
let $lpad = lpad($TOTISSUED,25,'.')
print $lpad (,20) !edit 9999999999
print 'Total Amount Issued:' (,40)
print $PMNTAMT (,60) edit $999,999,999.99
print 'Total Items Voided:' (+1,1)
let $lpad = lpad($VTOTISSUED,25,'.')
print $lpad (,20) !edit 9999999999
print 'Total Amount Voided:' (,40)
print $VOIDAMT (,60) edit $999,999,999.99
My output:
Batch Number: .............061899090423 Account Number:
.................80028547
First Check Number: ...................010002
Last Check Number: ...................021699
Total Items Issued: ....................10137 Total
Amount Issued: $ 19,624,543.76
Total Items Voided: ......................281 Total
Amount Voided: $ 520,776.29
I'm trying to get the right hand columns to line up just like the dollar amount
columns (right justified, no ........ for pad).
Thanks In Advance.
Joe Johnson
~~ JEJ ~~ ;{)
--------------------------------------------------------
$14.95 Unlimited Internet Access, http://www.surfree.com