| Author |
Topic |
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2006-04-11 : 09:48:01
|
select replace(local_notes,char(13),' ') from localsNot Working ...... |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-04-11 : 09:51:05
|
| check out for the syntax of Replace on BOL .. i guess you have not specied it correctly ..If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-11 : 09:58:25
|
| Perhaps there are no char(13) in your column, or there are also char(10) !Kristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-11 : 10:01:58
|
| Dont open new topic. If you dont get replies you need to waithttp://sqlteam.com/forums/topic.asp?TOPIC_ID=64511Tryselect replace(replace(local_notes,char(13),' '),char(10),' ') from localsMadhivananFailing to plan is Planning to fail |
 |
|
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2006-04-11 : 23:44:01
|
| sorry.. i will wait...but this also not workingthe column local_notes has the values Meetings -- 1st Thursday of the Month @ 7:30 p.m. Location: 4004 N. Cass Avenue Meetings -- Second Monday of the Month @ 7:00 p.m. Location: Peoria Labor Temple Bldg.Meetings -- 1st Tuesday of the Month @ 6:00 p.m. Location: 2005 Cabintown Road Meetings -- 1st Wednesday of the Month @ 7:30 p.m. Location: 2175 Rochester Drive Meetings -- 1st Monday of the Month @ 6:00 p.m. Location: 3316 Publishers Drive Meetings -- 3rd Tueday of the Month @ 6:00 p.m. Location: 3316 Publishers Drive Meetings -- 2nd Thursday of the Month @ 7:30 p.m. Location: 1001 Boyce Memorial Meetings -- 2nd Wednesday of the Month @ 7:30 p.m. Location: 1012 N. 5th Avenue select replace(replace(local_notes,char(13),' '),char(10),' ') from localsdoesnot works |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-11 : 23:53:23
|
use ascii() function to find out the ascii code for the and then use replace() to remove it. KH |
 |
|
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2006-04-12 : 00:23:42
|
| when i try SELECT ascii()error :Server: Msg 174, Level 15, State 1, Line 1The ascii function requires 1 arguments. |
 |
|
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2006-04-12 : 00:24:10
|
| SELECT ascii() |
 |
|
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2006-04-12 : 00:25:15
|
| SELECT ascii(p.m.)after p.m. there is the char which i want to replacae |
 |
|
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2006-04-12 : 00:25:50
|
| that char is not printing ... on the forum |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-12 : 04:12:17
|
| What type of character is it?New line or any other special char?MadhivananFailing to plan is Planning to fail |
 |
|
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2006-04-12 : 07:22:26
|
| the char is like a box == [] joining these two makes a box like in the table |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-12 : 09:51:19
|
use this to find out the ascii code of the characters that '' or box character. It only lists the first 10 characters ascii code for that column. Modify the code to add more n if the character is not within the first 10 chars.select local_notes, n, substring(local_notes, n, 1), ascii(substring(local_notes, n, 1))from locals, ( select 1 as n union all select 2 as n union all select 3 as n union all select 4 as n union all select 5 as n union all select 6 as n union all select 7 as n union all select 8 as n union all select 9 as n union all select 10 as n ) numwhere n <= len(local_notes)and ... KH |
 |
|
|
|