Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases Reporting with SQL Working with Text Concatenating Text

I am trouble with the concat function in sql

There must be something wrong with my syntax, but I can not figure it out

Steven Parker
Steven Parker
231,184 Points

Please show your complete query code here to make it possible for someone to help you with it.

Rania Zawawi
Rania Zawawi
22,240 Points

The correct answer for your challenge is select first_name || " " || last_name || " <" || email || ">" as to_field from patrons;

Steven Parker
Steven Parker
231,184 Points

You can still post your code for analysis if you want an explanation instead of a code spoiler, or if your issue is with the other task!

2 Answers

Rania Zawawi
Rania Zawawi
22,240 Points

try this it will work ==> select first_name || " " || last_name || " <" || email || ">" as to_field from patrons;

Joseph Maria Louis
Joseph Maria Louis
2,112 Points

Select first_name||" "||last_name||" "||"<"||email||">" as "to_field" from patrons;