ERROR WHEN CONCATENATING WITH A COMMA
i'M trying to conatenating this code including commas I seem to get an error.
SELECT street || " ," || city || "," || state || " ," || zip || " ." || country AS address FROM addresses;
Sean T. UnwinTreehouse Moderator 28,623 Points
You're very close!
There needs to be a space at the end of each of the separator strings, such as
', ' and
'. ', while between
zip there needs one (1) space only (i.e. no comma or period).
I would strongly recommend using singe quotes for String Literals as some database engines dislike double quotes except in specific circumstances.
Thank you Sean, I realized that the spacing between the quotation marks matter.