Page 1 of 1

RIGHT(C,N) does nothing

Posted: Sat Apr 05, 2003 10:41 am
by jsostakas
RR 10.0.012 XBase____I have a text field DESCRIPT from a Point of Sale application which stores the Credit Card Number, Expiration Date, and Approval Code. The format of the data is:____XXXXXXXXXXXXXXXXMM/YYAAAAAA____X is the Credit Card No. MM/YY is the expiration date, and A is the Approval Code.____I am creating a Credit Card Transaction report. Using a Calculated field CCNO with the expression LEFT(DESCRIPT,12) to display most of the Credit Card Number. This works fine. I have created another calculated field, CCAU with the expression RIGHT(DESCRIPT,6) to display the Approval Code. The CCAU in my report is always blank. ____Any ideas or suggestions would be greatly appreciated. __

=> RE: RIGHT(C,N) does nothing

Posted: Sat Apr 05, 2003 7:07 pm
by pdempsey
Try right trimming the field first. You^re probably just getting the blanks that pad the dbase field.____Hope that does it.__-Pat-

==> RE: RIGHT(C,N) does nothing

Posted: Sat Apr 05, 2003 7:41 pm
by jsostakas
There is no padding in the field, for it is fixed width. Thanks though!____This is partly an RTFM issue. I still do think that the function is not working for me, but I did find a work around.____SUBSTR(DESCRIPT,21,6) gets me exactly what I want, and with SUBSTR(DESCRIPT,17,5) I am able to pull out the expiration date as well.____Finding a way to pull out the expiration date lead me to find a way to extract the Approval Code. It is amazing what you can do when you Read the F***ing Manual!____