Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
216,136 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
216,136 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
216,136 Points

Glad to help — happy coding!