Concatenate text from multiple rows into a single text string and vice versa

Hello friends! Today we’ll be learning how to concatenate text from multiple rows into a single text string and vice versa. Easy to follow code attached in the tutorial. When working with large datasets in SQL Server, it’s common to need to combine text from multiple rows into a single text string. This can be useful for creating reports, generating email notifications, or creating custom messages for users. In this blog post, we’ll explore some techniques for concatenating text from multiple rows in SQL Server.

Read more

SQL Christmas Tree using SQL server Spatial data

SQL is an amazing tool, if we know to use it the right way. Using the concept of the SQL server spatial data and some mathematics, I have built this Christmas tree the SQL way!!. Attached is the image of the output. The code is as below. You too can run the code for yourself and generate the tree.

Note: After Executing the code, to see the image, Click on the “Spatial results” tab below in the results window, Uncheck the ‘Show Grid lines’ box in the right pane. You will be able to see the image.
Read more

1 2