Databases Reporting with SQL Working with Text Concatenating Text

Jason Nutt
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jason Nutt
Front End Web Development Techdegree Graduate 19,633 Points

I really did not want to ask for help on this one as I think I understand the concept...here is the code I tried.

SELECT first_name || " " || last_name || " " || "<" "email" ">" AS "to_field" FROM patrons;

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Jason Nutt! You're incredibly close. There is something slightly off with your concatenation around the email portion, though. First, we don't want the string "email", we want the value stored in the email field so instead of "email", I'm expecting just email. Secondly, you'll still need the concatenation operators between the angle brackets and the email field.

You have:

SELECT first_name || " " || last_name || " " || "<" "email" ">" AS "to_field" FROM patrons;

But I'm expecting:

SELECT first_name || " " || last_name || " " || "<" || email || ">" AS "to_field" FROM patrons;

Hope this helps! :sparkles:

Jason Nutt
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jason Nutt
Front End Web Development Techdegree Graduate 19,633 Points

It helps a ton. Thanks so much. I'm sure I will talk to you soon. Although the objective would be to avoid that by figuring out the solution myself. You are much appreciated Jennifer!