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 trialTom Weaver
2,342 PointsI can't get my head around the aliasing here.
The questions asks you to output the information with email displayed as <email>, but also then asks you to alias the column as "to_field".
I might just be having a mental block here, but I can't work out how to add angled brackets to my strings; and then also don't know how I would format it, as it feels like I'm double-aliasing?
1 Answer
Simon Coates
8,377 Pointsit seems okay with: SELECT first_name || " " || last_name || " <" || email || ">" AS to_field FROM patrons . I'm assuming the problem is more that something about the question is confusing. However, if not, he covers a similar case of concatenation in the video "Adding text columns together"
Tom Weaver
2,342 PointsTom Weaver
2,342 PointsHey Simon! I think it was my tired brain misreading the question, I was expecting there to be an auto-function in SQL or a shorthanded way of adding the angled bracket. I didn't think to simply add in string literals to add the brackets in haha.
Thanks so much for your answer though, this is exactly how I ended up solving it!