469,929 Members | 1,763 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,929 developers. It's quick & easy.

ASP query expression

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
Jul 19 '05 #1
1 1947
Marco Alting wrote:
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

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by John Øllgård Jensen | last post: by
1 post views Thread by Michel Walsh | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.