ASP query expression

M

Marco Alting

Hi,

is it possible to have a replace() function in an SQL query? I need to use
something like that to be able to sort my "sequential-numbers", which are
actually textfields like this:

98.1
98.10
98.2
98.3
98.4

What I want is to query these numbers, convert them by removing the dot with
the replace command and the sort the recordset on it.

Is this possible?


Thanks,
Marco
 
B

Bob Barrows

Marco said:
Hi,

is it possible to have a replace() function in an SQL query? I need
to use something like that to be able to sort my
"sequential-numbers", which are actually textfields like this:

98.1
98.10
98.2
98.3
98.4

What I want is to query these numbers, convert them by removing the
dot with the replace command and the sort the recordset on it.

Is this possible?


Thanks,
Marco

REPLACE is a T-SQL builtin function, so if you are using SQL Server, you
are all set. Of course, if the data is stored in a numeric column, then you
will need to cast the data to varchar before using REPLACE.

If not SQL Server, perhaps you would like to let us know what database you
are using ... ?

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,811
Members
47,357
Latest member
sitele8746

Latest Threads

Top