How use the substring method with sql 2000?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sheena777
    New Member
    • Dec 2007
    • 73

    How use the substring method with sql 2000?

    How Do i use the Substing method in sql 2000 if i have values from 1 to 12 and would like each of the numbers to repesent a month of the year.
    Example
    1 = January
    2= Febuary
    3 = March ....
    Are there any other method that I could use to get the month back with sql from an integer value?
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    but how that function is going to help you in this scenario ?

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      use DATENAME. You have to hard code the day and year part. Since you're just interested in the month name, you can pick any day and year.

      -- CK

      Comment

      • Sheena777
        New Member
        • Dec 2007
        • 73

        #4
        Originally posted by ck9663
        use DATENAME. You have to hard code the day and year part. Since you're just interested in the month name, you can pick any day and year.

        -- CK
        thanks I eventually got to that answer.

        Comment

        Working...