Hi, I am trying to update a part of an column containing emailadresses, and I got a tip using this:
UPDATE Student
SET EMail = SUBSTRING(EMail, 1, CHARINDEX('@', EMail) + 1) + [new.se]
WHERE (EMail LIKE [%old.se])
But I get the error message
Invalid column name 'new.se'
Is there something wrong or missing ?
new.se is not a column name, it should be the new domainadress...
I have been looking for how to use substring and charindex but I have not found any useful information...
UPDATE Student
SET EMail = SUBSTRING(EMail, 1, CHARINDEX('@', EMail) + 1) + [new.se]
WHERE (EMail LIKE [%old.se])
But I get the error message
Invalid column name 'new.se'
Is there something wrong or missing ?
new.se is not a column name, it should be the new domainadress...
I have been looking for how to use substring and charindex but I have not found any useful information...