Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kohlhaas77
Starting Member
25 Posts |
Posted - 2008-07-28 : 11:32:59
|
I am wondering if there is a performance preference between the following script for adding padded zeros.RIGHT(REPLICATE('0', 5)+ CONVERT(VARCHAR(5),MarketNbr),5)vs.RIGHT('00000' + CONVERT(VARCHAR,IPANbr), 5) TIA,Dan |
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2008-07-29 : 03:17:52
|
How about experimenting?? "Try it in a large timed loop"Nothing better than self-discovery.(I guess no) |
 |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-07-31 : 02:06:59
|
Use the Execution Plan . If you are going to do repeated tests - ensure you clear the buffers and cache before you do the execute , to retain a consistent patternJack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
 |
|
|
|
|