Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
In Over My Head With A Scalar-Valued Function
Message
 
 
À
23/12/2009 21:15:47
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Application:
Desktop
Divers
Thread ID:
01440468
Message ID:
01440480
Vues:
27
>That worked! Thanks. I hadn't thought of the value possibly being all zeros. What's the best way to trap for that?

I guess just add one more OR condition and explicitly check for this. Though do we also want to handle 1, 2 or N less than 6 "0", e.g.

cJobNo = '0' or cJobNo = '00' ?

Let me think a second, the simplest solution would be

or ltrim(tcJobNo) in ('0','00','000','0000', etc.) -- let me think of a better solution.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform