Databases Reporting with SQL Working with Text Concatenating Text

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

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

2 Answers

Jennifer Nordell
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:

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!