RIGHT(C,N) does nothing

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
jsostakas
Posts: 2
Joined: Tue Oct 10, 2017 12:44 pm

RIGHT(C,N) does nothing

Post by jsostakas » Sat Apr 05, 2003 10:41 am

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. __

pdempsey
Posts: 56
Joined: Tue Oct 10, 2017 12:44 pm

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

Post by pdempsey » Sat Apr 05, 2003 7:07 pm

Try right trimming the field first. You^re probably just getting the blanks that pad the dbase field.____Hope that does it.__-Pat-

jsostakas
Posts: 2
Joined: Tue Oct 10, 2017 12:44 pm

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

Post by jsostakas » Sat Apr 05, 2003 7:41 pm

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!____

Post Reply