Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cast(varchar column As Integer) fails
Message
De
07/07/2005 09:57:12
 
 
À
07/07/2005 09:22:28
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01029872
Message ID:
01029921
Vues:
15
>Fabio,
>
>Molto grazie (is that correct?) - anyway, thank's a bunch.
>
>Although I'm not sure I understand the logic of it - why just 'E'?
>Is that really the only one that will convert to numeric?
>
>
For positive integers you can try with this:
SELECT CASE WHEN  '1234567890' LIKE LEFT('[0-1][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
,LEN('1234567890')*5) THEN 1 END

--SELECT CASE WHEN  DamageNo LIKE LEFT('[0-1][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
,LEN(DamageNo)*5) THEN 1 END
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform