I have a column in on table that the users are copying and pasting bulletted lists from M$ Word. These bullets are stored in the column as three special characters (•) and I want to replace them with •
But trying to use SQL REPLACE, I get:
I have a tried a couple different ways, and I think I might be able to fix this with a COLLATE hint on my column, but I don't know what to COLLATE it to. Anyone have any suggestions on how to replace this????
Thanks if you can...
=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)
Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
C#.NET Programmer
But trying to use SQL REPLACE, I get:
Code:
Msg 8116, Level 16, State 1, Line 1
Argument data type text is invalid for argument 1 of replace function.
I have a tried a couple different ways, and I think I might be able to fix this with a COLLATE hint on my column, but I don't know what to COLLATE it to. Anyone have any suggestions on how to replace this????
Thanks if you can...
Code:
SELECT
'Students enrolled in [our] diploma programs are billed by the academic year. Some programs are provided during a single academic year and some programs are provided across two academic years. A student withdrawing from a program receives a pro-rata refund based on the percentage of the student’s completion of her then current academic year as follows: • During the first 10% of the academic year for which the student has been charged, the school shall refund 90% of tuition. • After 10% but within 20% of the academic year for which the student has been charged, the school shall refund 80% of tuition. • After 20% but within 30% of the academic year for which the student has been charged, the school shall refund 70% of tuition. • After 30% but within 40% of the academic year for which the student has been charged, the school shall refund 60% of tuition. • After 40% but within 50% of the academic year for which the student has been charged, the school shall refund 50% of tuition. • After 50% but within 60% of the academic year for which the student has been charged, the school shall refund 40% of tuition. • After 60% of the academic year for which the student has been charged, the school shall retain 100% of tuition. If a student withdraws, in addition to tuition, the student is responsible for the registration fee and book, materials and laboratory charges which are not subject to the pro rata refund calculation. If all books are returned in new and unused condition within 20 days after the date of withdrawal, a student receives a refund of the book charges. Uniform charges are not refundable once a uniform has been issued to a student. If a student withdraws after three days from signing the enrollment agreement but before starting classes, non-refundable fees regarding admission and registration do not exceed $150.00. If a student withdraws from school, any refund due to the student is paid within 45 days of the earliest of the (1) date on which student informed the school of his/her withdrawal; (2) date on which the school determines that the student dropped out; or (3) end of the semester in which the student withdrew. If a student does not return to the school at the expiration of an approved leave of absence, refunds are made within 45 days of the earlier of the date of the expiration of the leave of absence or the date the student notifies the school that the student will not be returning to the school after the expiration of an approved leave of absence. The student is responsible for paying any balance due on his account after a withdrawal from [us]',
'###',
REPLACE('###', '###', '•')
SELECT
EnrollmentPolicy,
REPLACE(EnrollmentPolicy, '•', '•')
FROM EnrollmentPrograms
--WHERE ProgramId = 19
WHERE EnrollmentPolicy LIKE '%•%'
SELECT
EnrollmentPolicy,
REPLACE(REPLACE(REPLACE(REPLACE(EnrollmentPolicy, 'â', '#'), '€', '#'), '¢', '#'), '###', '•')
FROM EnrollmentPrograms
--WHERE ProgramId = 19
WHERE EnrollmentPolicy LIKE '%•%'
=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)
Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
C#.NET Programmer