473,387 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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?
Jun 17 '08 #1
3 1938
debasisdas
8,127 Expert 4TB
but how that function is going to help you in this scenario ?
Jun 18 '08 #2
ck9663
2,878 Expert 2GB
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
Jun 19 '08 #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
thanks I eventually got to that answer.
Jun 20 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mike P | last post by:
If I want to get the last 4 characters of a string is this the right way to do it? int intCardLength = Convert.ToInt32(strCardNumberUnEnc.Length); strCardNumberUnEnc =...
3
by: Tim Soliday | last post by:
I have been looking at regular expressions lately, and I'm hoping that maybe someone could help me? I am trying to find the position of a substring, and then returning the substring including...
2
by: mallard134 | last post by:
Could someone please help a newbee vb programmer with a question that is driving me crazy. I am trying to understand a line of code that is supposed to return the domain portion of a valid email...
3
by: David Greenberg | last post by:
Hi I have a character field, varchar(60), and I want to replace only a part of it, a set substring which is always in the same set positions. Does anyone have an Sql statement or algorithm/sp ...
8
by: chudson007 | last post by:
I need help capturing information from a free text field. The 10 examples below contain examples of the information I am trying to capture. In each cell I am trying to capture the number between...
29
by: Ajay | last post by:
Hi all,Could anybody tell me the most efficient method to find a substr in a string.
2
by: Badass Scotsman | last post by:
Hello, Using VB and ASP,NET I would like to be able to search a STRING for a smaller STRING within, based on the characters which appear before and after. For example: String1 = " That was...
6
by: kellygreer1 | last post by:
What is a good one line method for doing a "length safe" String.Substring? The VB classes offer up the old Left function so that string s = Microsoft.VisualBasic.Left("kelly",200) // s will =...
11
by: dyc | last post by:
how do i make use of substring method in order to extract the specified data from a a long string? I also need to do some checking b4 extracting the data, for instance: it only will extract the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.