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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 padding null fields

Author  Topic 

paulaoneill
Starting Member

1 Post

Posted - 2003-07-24 : 05:52:54
RPAD or LPAD doesn't work on NULL fields.
How do you pad out a field to a certain length when the field contains NULL?



Edited by - merkin on 07/24/2003 06:59:56

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-07-24 : 06:51:38
( ... (isnull(field1, ''))

- Vit
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-07-24 : 07:31:46

update mytable
set mycol = space(n)
where mycol is null

 


Jay White
{0}
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-07-24 : 09:24:21
Why would you want to?



Brett

8-)
Go to Top of Page
   

- Advertisement -