Error in concatenation expression
Just a beginner, but can't figure out the reason for my error. Trying to create the 'email' field with the following query:
SET Students.Email = FirstName + "." + LastName + "@mycollege.edu"
but get the following error:
Msg 102, Lev开发者_StackOverflowel 15, State 1, Line 1 Incorrect syntax near '.'.
Like this:
UPDATE Students SET Email = FirstName + '.' + LastName + '@mycollege.edu'
But I'd suggest you read up on SQL Server and how to use SQL - this is an extremely basic question and I'm sure Google or Bing have some answers for you.
I believe you want to UPDATE
the table:
UPDATE Students
SET Email = FirstName + "." + LastName + "@mycollege.edu"
精彩评论