Question about Microsoft SQL Server Standard Edition for PC

1 Answer

Selecting only Numeric part of a database feild

Hi, How to get only the numeric part of a database feild of varchar type. Thanks in advance. Regards, Bharath K R

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.


    An expert that has over 10 points.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 13 Answers
Re: Selecting only Numeric part of a database feild

Well, one solution is to fetch the whole data, including the non-numeric part, and then convert that into a number. Most programming languages strips off the non-numeric part of a string when converting into a number. For example, converting '24Michell' to a number will result into '24'. Consult your programming manual on how to convert a string into a number.

Posted on Oct 01, 2007

Add Your Answer

0 characters

Uploading: 0%


Complete. Click "Add" to insert your video. Add


3 Points

Related Questions:

1 Answer

Having troube with my FOREIGN KEYs on two tables.

I suggest you visit this website you will get the solution, I tried and it worked.

Nov 25, 2013 | Business & Productivity Software

1 Answer

SQL query to change date and/or time format

The function you're probably looking for is CONVERT. Here's an example (101 applies the format "mm/dd/yyyy", 108 applies "hh:nn:ss"):

SELECT CONVERT(varchar(10),getdate(),101) as JustDate, CONVERT(varchar(8), getdate(), 108) as JustTime


JustDate JustTime
---------- --------
09/24/2013 13:13:56

(1 row(s) affected)

Jul 15, 2013 | Microsoft SQL Server 2005 Standard Edition

1 Answer

How to display numbers in a cell to 7 digits

Right click on the cell that you need to display as a 7 digit number and then choose FORMAT CELL the choose CUSTOM in the NUMBER tab and type seven zeros into the TYPE field, you will see in the preview that the display is formatted as you have requested and the added bonus is that the field still retains is numeric characteristics and can be easily used for calculations etc.

May 01, 2013 | Microsoft Excel 2010

1 Answer

What is the 25 product key??

It's an alpha-numeric code which can be found on the Box/ Envelope that came with the disc.




Feb 13, 2011 | Microsoft Office PowerPoint Home and...

1 Answer

Text box restriction

I hope this helps and thanks for rating my effort...any other questions...shoot em to me....The Fang.

Restricting character input You can use the SetInputTextType command to restrict the characters that the user can enter in the text input dialog box. For example, suppose an application contains an input text field for users to provide a numeric value, such as their age, and that the input text field has the variable name ageVar. To ensure that the user enters only numeric values in the text input dialog box, you could add the following code to your application:
fscommand2("SetInputTextType", "ageVar", "Numeric");
When users open the input text dialog box, they can enter only numeric values in the text fields.
For more information, see SetInputTextType in the fscommand2 function entry in the Flash Lite 2.x ActionScript Language Reference.

May 28, 2009 | Adobe Flash® CS3 Professional Full Version...

1 Answer

Transformed string to numeric values- does not display values

You can try to format the cell to number, if this doesn't give you the desired result - Use the custom feature and update your specific characters into values using 0

Apr 29, 2009 | SPSS 13.0 (30960UU)

1 Answer

Conversion of nemeric value

If you just want to change the format to text in a query, you can use the Str function in your query. In MS Access, in the Field area of your query in Design View, you can type the following:
YourDesiredCharFieldName: Str([YourNumericFieldName]).

On the other hand, if you prefer to convert the data once and for all in your table, you can go to the Table Design View for that Table, change the Data Type of your numeric field to "Text", and close that window to save the changes. This will convert all of your data in that field from numeric to text permanently.

Jul 01, 2008 | Microsoft Office Access 2003 (077-02871)...

1 Answer

Convert String to Nmuneric

Hi Saiprasad, Tough day huh?! :-) Try the following: Suppose "2" is in cell "A1" Type: =value(a1). Let me know if this helped and please rate my solution. Best, D.

Sep 03, 2007 | Microsoft Office Standard for PC

Not finding what you are looking for?
Microsoft SQL Server Standard Edition for PC Logo

Related Topics:

91 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Business & Productivity Software Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers


Level 3 Expert

18258 Answers

Sudeep Chatterjee
Sudeep Chatterjee

Level 3 Expert

3267 Answers

Are you a Microsoft Business and Productivity Software Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides