Skip to main content

All Questions

Tagged with
0 votes
2 answers
1k views

How to convert text field to numeric field and null non-numeric values?

I have a column of text data which contains a bunch of various values...many of which are numbers, but others which are not. I want to convert this text column to a numeric column and convert any ...
mike hennessy's user avatar
4 votes
3 answers
24k views

How to insert empty string (' ') to decimal or numeric in SQL Server?

Is there a way to insert an empty string (' ') into a column of type decimal? This is for the example : create table #temp_table ( id varchar(8) NULL, model varchar(20) NULL, Plandate ...
Dody Suhada's user avatar
0 votes
0 answers
229 views

Transform the output of an SqlQuery to numeric

I have got a Sql table and connected to it using R with odbcConnect(). The data I used is to find here: http://robjhyndman.com/tsdldata/data/nybirths.dat I loaded a Query with bstring <- ...
YannikT's user avatar
0 votes
1 answer
105 views

Sorting in a right way numeric values separated by an apostrophe?

i have a table where i have some numeric records such as: NET_SALES 0 0 318 1'200 10'720 12'812 -1'285 13'682 40'713 -4'170 ... I´ve used: TO_CHAR(Numeric field, 'NLS_NUMERIC_CHARACTERS = '...
Alonso González Nestal's user avatar
-3 votes
1 answer
1k views

SQL extract multiple numeric values from string column [closed]

I read and used the function suggested in this article: http://blog.sqlauthority.com/2008/10/14/sql-server-get-numeric-value-from-alpha-numeric-string-udf-for-get-numeric-numbers-only/ and it works ...
k-man's user avatar
  • 1,231
0 votes
1 answer
164 views

VB6 comparing only numeric characters in srings

I need to compare phone numbers from a CSV file to phone numbers in an SSMS database in VB6 without using the .Net Library. One may have a number as 555-555-5555 and the other may have the same number ...
Davidp04's user avatar
  • 145
2 votes
3 answers
10k views

How do I search for a five digit number in a string column?

What I'm trying to do is determine (Using Teradata SQL) if a person's zip code has accidently been put on an address line. I've looked on various forums and I can't find any similar questions. ...
Lee_Str's user avatar
  • 3,496
45 votes
5 answers
41k views

SQLite ORDER BY string containing number starting with 0

as the title states: I have a select query, which I'm trying to "order by" a field which contains numbers, the thing is this numbers are really strings starting with 0s, so the "order by" is doing ...
Bigger's user avatar
  • 1,980
2 votes
4 answers
1k views

PostgreSQL: IN A SINGLE SQL SYNTAX order by numeric value computed from a text column

A column has a string values like "1/200", "3.5" or "6". How can I convert this String to numeric value in single SQL query? My actual SQL is more complicated, here is a simple example: SELECT ...
RoundOutTooSoon's user avatar
2 votes
3 answers
4k views

Oracle Query - Get only strings in the select field

Maybe this sounds a little bit crazy, but I need to come up with a query to retrieve only letters out of an alphanumeric field. For example: TABLE 1234ADD 3901AC 1812OPA 82711AUU RESULTS EXPECTED ...
danboh's user avatar
  • 778