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
 Transact-SQL (2000)
 To Query Special Characters

Author  Topic 

LacOniC
Starting Member

29 Posts

Posted - 2006-05-23 : 04:15:49
Hi. How can i query rows that contain special characters like enter, tab etc. In address column there are some entries that don't contain a visible character. I want to do them NULL. But can't query...

Thanks in advance....

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-23 : 04:25:50
Where col like '%'+char(10)+'%'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-05-23 : 04:25:57
[code]where yourcol like '%' + char(13) + '%'[/code]

Note : char(13) is ENTER / CR



KH

Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-05-23 : 04:26:42

5 7 seconds slower


KH

Go to Top of Page

LacOniC
Starting Member

29 Posts

Posted - 2006-05-23 : 04:40:44
Thank both of you.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-23 : 04:57:34
>>I want to do them NULL

What did you mean by NULL?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

LacOniC
Starting Member

29 Posts

Posted - 2006-05-23 : 10:40:00
update addresses set address=null where ...
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-23 : 10:50:19
quote:
Originally posted by LacOniC

update addresses set address=null where ...


Be aware that will set NULL value to address

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -