• Subhro,

    There is a REPLACE operation followed by the CAST in my code.

    REPLACE will replace a set of characters , with a replacement value , on the string in which you want a part of it to be replaced. For syntax, kindly refer to the link i provided in the previous post!

    In our case, we dont need cnt from the OrderYear column.

    So, we used REPLACE('cnt2007', 'cnt', '') ;

    This implies, in the string 'cnt2007', if u find 'cnt' in it, replace it with '' (a empty string). Thus, at the end of this code, your new string will be '2007'; As we need that to be INT, we cast '2007' to INT.

    Hope this information helps you! If you further need assistance , let us know here!

    I am Prasanna, from India! Glad to help you and meet you in the forums!

    Cheers!