Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sorting multiple fields in one column
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01219371
Message ID:
01219407
Vues:
6
>In principal we could do that. Unfortunately the street number field is a text field. I tried to cast it to a number and in some cases there is still text in the street number field and it won't cast without an error.
>If you know away around that problem as well I'dd appreciate it.

I'm assuming sql server for backend here. You should be able to test the field value with ISNUMERIC and use a case to determine whether to cast the value or not.

SELECT
CASE isnumeric(var_name)
WHEN 1 THEN cast(var_name AS int)
ELSE 0
END AS numaddress
FROM MyTable
Michael McLain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform