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

First challenge - task 2 of 2 - concatenating text in reporting with SQL course, is this an error?

I keep getting the error message: Your query didn't retireve the addresses in the correct format. Expecting 2532 2nd ST, San Diego, California 90222. USA not 2532 2nd ST, San Diego, California, 90222. USA.

The only difference I can see is the full stop on the end, but I'm not adding a full stop and there is none in the database I can see.

My SQL query is: SELECT street || ", " || city || ", " || state || ", " || zip || ". " || country AS address FROM addresses;

The address it shows in the results is below:

address 2532 2nd ST, San Diego, California, 90222. USA

Am I missing something or is this an error with the challenge?

1 Answer

Seth Kroger
Seth Kroger
56,413 Points

The string to concatenate between the state and zip would be " " because it's not usual to have a comma between them in an address.

You are a champion. I was staring at this for so long, unable to spot that difference. Thank you for helping with this.