Reputation: 2146
Right now I am using the following query to update (remove) the existing sql char
UPDATE tblCompany
SET CompanyName = replace(CompanyName , '''', '')
is there anyway when I try to strip those spl char when I use select statment ?
like
Select ID,CompanyName(replace(CompanyName , '''', '')) from tblcompany
Upvotes: 1
Views: 125
Reputation: 4167
You have replace with like this.
SELECT ID, REPLACE(CompanyName ,'''', "") as company_name FROM tblCompany
For detailed example click here
Upvotes: 2
Reputation: 5459
You can use the below query:
select ID,replace(CompanyName , '''', '') as CompanyName from tblCompany;
But Remember this is just temporary ,holds only till current selection. It will not be updated in the main table.
Upvotes: 3