Reporting with SQL
Working with Text
I don't understand why this won't work.....................
n 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
This is my code here, as I don't see it attached
select street || "," || " " || city, || "," || " " || state || " " || zip || "." || " " || country as address from addresses
Why won't this work?????????????
You were very close! But there should not be a comma after the field name "city".
Cant believe I put that there and didn't see it, thanks for your help Steven!
Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.
I forgot my password