Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent to PADL()?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01555196
Message ID:
01555198
Vues:
55
>I'm "translating" an SQL statement from VFP and one of the fields I'm pulling needs to be nchar(3) left filled with '0'.
>
>In VFP it's PADL(alltrim(str(eclscore)),3,'0') - eclscore is a numeric, so I know I need to Cast(eclscore as nchar(3)), but I can't seem to find the PADL replacement - what should I be using to do the PADL?


http://blog.sqlauthority.com/2009/03/10/sql-server-pad-ride-side-of-number-with-0-fixed-width-number-display/

By the way, In foxpro I would do transform(eclscore, '@L 999')
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform