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 trialBrane Opačič
6,686 PointsSQL : Add the username after the review. e.g. "That was a really cool movie - chalkers"
I need a bit of help with this SQL playground task. It's located in "Reporting with SQL". -> "SQL Playground - Stage 2: Practice".
I know how to replace using REPLACE() function, but I'm having trouble finding a way to add stuff at the end of strings.
Is there a way to do so, or am I missing something?
Thanks!
3 Answers
Charlie Harcourt
8,046 PointsSELECT review || ' - '|| username AS 'Review + Username' FROM reviews
:)
Adil Ahmed
156 PointsI too have done a same code.but i don't know is it correct or bummer .
Kenneth LaBounty
10,631 PointsIt is correct, you can tell by pressing the "Run" key inside the SQL Playground and reviewing what is displayed.
You just want to make one minor adjustment: SELECT review ||" - "|| username FROM reviews;
Put the " - " symbol with a space on each side and you are all set.
Brane Opačič
6,686 PointsSELECT review || " " || username FROM reviews;
This kinda settles my problem, but I'm gonna leave it here for others to see!
Cheers!