Question: Query 1 is just a simple select statement with individual columns selection. Query 2 I tried to concatenate the address into one column so that

Query 1 is just a simple select statement with individual columns selection.
Query 2 I tried to concatenate the address into one column so that I can show the complete address. Please note whenever there is a NULL in a column the concatenation for that row becomes NULL entirely. The row 5,6,7 and 9. As I explained in the class any NULL column concatenation with a non-NULL column will make the resulting column NULL.
Query 3 I proposed a solution to this issue.
I placed a test query before concatenation. If a Column is NULL, then I am concatenating an empty string '' instead of NULL. I am doing this test in each column of the address columns. Please note how the address is coming out clean without losing the address due to NULL concatenation. If there is NULL, then you can see '' in-placeofthecolumn.
Query 1 is just a simple select statement with

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!