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--