SQL statement to remove a character from a field
Update Set Accessory=replace(Castasvarchar(8000)),' Http://demo.m-school.net',')
For example:
UpdateNotificationsSetAccessory=Replace(Cast(Accessory as varchar(8000)),'http://192.168.2.180',"')UpdateNotificationsSetAccessory=Replace(Cast(Accessory as varchar(8000)),'http://zpzx.m-school.net',"')UpdateHomeworksSetAccessory=Replace(Cast(Accessory as varchar(8000)),'http://192.168.2.180',"')UpdateHomeworksSetAccessory=Replace(Cast(Accessory as varchar(8000)),'http://zpzx.m-school.net',"')UpdateOpencoursesSetAttachment=Replace(Cast(Attachment as varchar(8000)),'http://192.168.2.180',"')UpdateOpencoursesSetAttachment=Replace(Cast(Attachment as varchar(8000)),'http://zpzx.m-school.net',"')UpdateOpencoursesSetAudio=Replace(Cast(Audio as varchar(8000)),'http://192.168.2.180',"')UpdateOpencoursesSetAudio=Replace(Cast(Audio as varchar(8000)),'http://zpzx.m-school.net',"')UpdateListencoursesSetAttachment=Replace(Cast(Attachment as varchar(8000)),'http://192.168.2.180',"')UpdateListencoursesSetAttachment=Replace(Cast(Attachment as varchar(8000)),'http://zpzx.m-school.net',"')UpdateListencoursesSetAudio=Replace(Cast(Audio as varchar(8000)),'http://192.168.2.180',"')UpdateListencoursesSetAudio=Replace(Cast(Audio as varchar(8000)),'http://zpzx.m-school.net',"')
Teacher, student, parent Picture:
UpdateSys_userSetPortrait=Replace(Portrait,'http://zpzx.m-school.net',"')UpdateStudentsSetPortrait=Replace(Portrait,'http://zpzx.m-school.net',"')UpdateParentsSetPortrait=Replace(Portrait,'http://zpzx.m-school.net',"')
SQL statement to remove a character from a field