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

Rashmi Jha
Rashmi Jha
2,842 Points

Concatenation challenge task 2 of 2

SELECT street ||", " || city || ", " || state || ", " || zip || ". " || country AS address FROM addresses;

What's wrong in this code

1 Answer

Steven Parker
Steven Parker
231,269 Points

For a complete analysis and accurate answer, always provide a link to the challenge.

But I'd bet it's not expecting a comma between the state and the zip.

Rashmi Jha
Rashmi Jha
2,842 Points

still, it gives an error of type:

Bummer! Your query didn't retrieve the addresses in the correct format. Expecting 2532 2nd ST, San Diego, California 90222. USA not 2532 2nd ST, San Diego, California 90222. USA.

Steven Parker
Steven Parker
231,269 Points

That's odd. I pasted your code directly into the challenge, removed that comma (only the comma, not the space), and it passed.

If you're still having trouble, show the entire query again (and a link to the challenge!).

Rashmi Jha
Rashmi Jha
2,842 Points

Thanks, Steven I tried again and this time it works. Maybe it didn't get save properly that time that's why it gave an error. Thanks once again

Steven Parker
Steven Parker
231,269 Points

Glad to help — happy coding!