Afficher un message
Vieux 24/03/2008, 18h01   #5
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How To Convert String to Numeric for Sorting?

-cicada- (johnfurphy@a1.com.au) writes:
><CFPARAM name="DefOrder" default= Lot_No>
>
> However if I change the above line to:
>
><CFPARAM name="DefOrder" default= CASE WHEN RIGHT(lot_no, 1) LIKE '[A-
> Z]'
> THEN CAST(LEFT(lot_no, LEN(lot_no) - 1) AS INT)
> ELSE CAST(lot_no AS INT)
> END, lot_no>
>
> I receive an error message, as a result of inclusion of the brackets
> in the expression.


What about actually posting the error message? Wether you actually
do something like the above, I don't know, but I don't know ASP or
ASP .Net.

But wouldn't you at least have to put the entire SQL-expression in
double quotes? You may also have to replace [] with tokens starting
with &. On the top of my head, I don't know what the names for the
brackets are in HTML.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
 
Page generated in 0,04802 seconds with 9 queries