Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql Equivalent to PADL() in SQL 2000
Message
 
 
À
08/09/2006 12:46:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01152075
Message ID:
01152378
Vues:
23
Tracy,

I was refering to UDFs (User Defined Functions) not to the built-in functions.

>The query will typically be done on a single table pulling roughly 200-3000 (at most I think) records. Can you think of a better way to correctly sort a character numeric field? I am sorting addresses which may include more than one city with the same street name so I need to sort the number portion of the street address correctly so they line up as such:
>
>100 S Main St
>101 S Main St
>200 S Main St
>1000 S Main St
>
>and not:
>
>100 S Main St
>101 S Main St
>1000 S Main St
>200 S Main St
>
>Everything sorts correctly except the number field which does sort correctly if I use replicate(). I'm guessing the table could have anywhere from 100 to 30000 records (fire hydrants in a city or county). In this case, I am only pulling certain records based on a WHERE condition though (which is based on a logical field).
>
>
>
>>Tracy,
>>
>>Keep in mind that UDFs in SQL SERVER slow queries significantly.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform