Reputation: 123
I don't understand what is wrong with my code and why this error keeps popping up
CREATE VIEW LocUserComp AS
SELECT concat(location.Loc_Address, location.Loc_City,
location.Loc_State) AS Customer_Address,
(users.User_FName, users.User_LName) AS Customer_Name
FROM location
JOIN users
ON location.Loc_ID=Users.Loc_ID
Upvotes: 1
Views: 61
Reputation: 1269583
Drop the parentheses around the two columns. I think you intend for a second concat()
:
CREATE VIEW LocUserComp AS
SELECT concat(l.Loc_Address, l.Loc_City, l.Loc_State) AS Customer_Address,
concat(u.User_FName, u.User_LName) AS Customer_Name
FROM location l JOIN
users u
ON l.Loc_ID = u.Loc_ID;
Upvotes: 1