Crystalguru
Technical User
Crystal Version 8.5
MS SQL 2000
I need to convert the following id code to ascii numbers. A-Z = 65-90,
0-9 = 48-57
ID Code
123BDC455
040CGQ791
The code will always be 3 numbers, 2 chars, 3 numbers.
I need them to convert to:
ID Code conversion
123BDC455 495051666867525353
040CGQ791 485248677181555748
I am trying to use the following:
right(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace
(mid(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace
(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace
(idcode,"A", "65"),"B","66"),"C","67"),"D","68"),"E","69")
,"F","70"),"G","71"),"H","72"),"I","73"),"J","74"),"K","75"),"L","76"),"M","77"),"N","78"),"O","79"),"P","80"),"Q","81"),"R","82"),"S","83"),"T","84"),"U","85"),"V","86"),"W","87"),"X","88"),"Y","89"),"Z","90"),6)
,"0","48"),"1","49"),"2","50"),"3","51"),"4","52"),"5","53"),"6","54"),"7","55"),"8","56"),"9","57"),6);
The return results are coming back as:
743590
457425
I am missing something here.
The above example code is only for the right and mid. I needed to start small.
Thanks
MS SQL 2000
I need to convert the following id code to ascii numbers. A-Z = 65-90,
0-9 = 48-57
ID Code
123BDC455
040CGQ791
The code will always be 3 numbers, 2 chars, 3 numbers.
I need them to convert to:
ID Code conversion
123BDC455 495051666867525353
040CGQ791 485248677181555748
I am trying to use the following:
right(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace
(mid(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace
(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace
(idcode,"A", "65"),"B","66"),"C","67"),"D","68"),"E","69")
,"F","70"),"G","71"),"H","72"),"I","73"),"J","74"),"K","75"),"L","76"),"M","77"),"N","78"),"O","79"),"P","80"),"Q","81"),"R","82"),"S","83"),"T","84"),"U","85"),"V","86"),"W","87"),"X","88"),"Y","89"),"Z","90"),6)
,"0","48"),"1","49"),"2","50"),"3","51"),"4","52"),"5","53"),"6","54"),"7","55"),"8","56"),"9","57"),6);
The return results are coming back as:
743590
457425
I am missing something here.
The above example code is only for the right and mid. I needed to start small.
Thanks