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 trialChristopher Johnson
2,066 PointsWhy am I receiving "no such column: street" ?
Columns clearly defined in task. One of the columns is street. It returns SQL Errors: no such column: street. Is this again a table name error as I read that occurred a year ago or user error? Please help. Thank you
Query is as follows:
SELECT street|| ","|| city || ","|| state || "," || zip || "."|| country AS addresses;
2 Answers
Sebastian Barbiero
6,529 PointsYou are missing a FROM statement. Also account for the spaces in the desired format. Your string characters you are directly injecting should have a space. EX. street || ", "|| city
Vittorio Somaschini
33,371 PointsHi Christopher.
please provide your code so that we can have a look.
Vito
Christopher Johnson
2,066 PointsSELECT street || "," || city || "," || state || "," || zip || "."|| country AS address; SQL Error: no such column: street
In an ecommerce database there's a addresses table. There is an id, nickname, street, city, state, zip, country and user_id columns.
Concatenate the street, city, state, zip and country in the following format. Street, City, State Zip. Country e.g. 34 NE 12 st, Portland, OR 97129. USA
Alias the concatenated string as address
Christopher Johnson
2,066 PointsChristopher Johnson
2,066 PointsThank you good sir