Dear All
Thanks for your attention.
In an order history table 'orders', there is an varchar column 'order_number'.
e.g. 'OU123456', 'OU123456R1', 'OU987987987R11'
There is a 'R' when the order is revised. (Note that I know this table design is bad but it is an existing table which I could not replace)
I would like to get the revision number using sql,
e.g. 'OU123456', 0
'OU123456R1', 1
'OU987987987R11', 11
Note that the length of order number and revision varies.
The first two chars may contains 'R' e.g. 'RQ456456R1'
could anyone suggest some ideas? Thanks.
Best Regards
swivan
- Edited by swivan Monday, December 29, 2014 3:54 AM more information