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 |
|
hueby
Posting Yak Master
127 Posts |
Posted - 2006-03-17 : 10:40:02
|
Hey all,I have a column of data that is 15 length. Data in this column usually ranges from 6-9 characters long. I'm working on a query to go through the data and add blank spaces after the data to fill it to 15 length.So far, I'm playing with this code but not sure if I'm going in the right direction?UPDATE IM_ITEM_MASTER_MCSET IM_ITEM_MASTER_MC.item_code = left(item_code,15 + REPLICATE(' ',15)) |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-03-17 : 10:49:59
|
| closeitem_code = left(item_code + REPLICATE(' ',15), 15)==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
hueby
Posting Yak Master
127 Posts |
Posted - 2006-03-17 : 11:36:10
|
| Ahh! Got it! Thank you! |
 |
|
|
|
|
|