|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, January 07, 2011 2:34 AM
Points: 35,
Visits: 51
|
|
Thank U so so much Cold Coffee,And very sorry that I am responding today as I had left my office at that moment.
May I know your name please, as U can guess I am subhro from India. Can u just explain what is the idea behind this query you have send?
Thanks
Subhro
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, January 07, 2011 2:34 AM
Points: 35,
Visits: 51
|
|
Thanks for your assistance
Cheers
Subhro
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 4:37 PM
Points: 2,248,
Visits: 5,352
|
|
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!
|
|
|
|