Oh yeah, that flew right by me at the time! Thanks Sergey.
>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.
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"