Databases Reporting with SQL Working with Text Concatenating Text

Charles Fields
Charles Fields
4,205 Points

Has anyone been able to satisfy the question of querying to this format? Andrew Chalkley <andrew@teamtreehouse.com>

My answer is SELECT first_name || " " || last_name || " <" || email || ">" AS “to_field” FROM patrons; In the SQL Playground, using the similar table= customers, this yields the expected result: Lauren Chalkley Lauren.Chalkley@example.com Dave McFarland Dave.McFarland@example.com Pasan Premaratne pdawg@example.com Andrew Chalkley Andrew@teamtreehouse.com

I can't help wondering if there's something about the question I don't get. Tried leaving out prefix space before email, adding a period on the end too.

Charles Fields
Charles Fields
4,205 Points

Just noticed, the pasted results dropped the characters "<" and ">" in the details section above, but they were fine in the work space.

1 Answer

The fancy/curly quotes around to_field are causing the task to fail. Either remove them or replace them with straight quotes and you should pass.

Charles Fields
Charles Fields
4,205 Points

Perfect! Thanks, Kris!

PS I think this happened when I copied an early attempt to MS Word, then copied it back after figuring out an error