Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Angelo writes "Sorry for the 'cryptic' title...The problem:I have a DB listing books. All data are 'very well' broken down into their own fields, like 'pages', 'price', etc.The need arises to re-connect few fields together, intermixed by puntuaction, like title,(comma) author,(comma) place,(comma) date,(comma), edition.(full stop)What will be the exact SQL to connect all the above together, keeping present eventual NULLs (for certain titles I may not have the data for 'edition', for ex.)And also: if the last field IS NULL, the before-last field should change the following punctuation, i.e. should be followed by a full stop, no more by a comma.In other words:HOW TO CODE AN SQL TAKING CARE OF DYNAMIC DATA AND/OR DYNAMIC TEXT (text connected to the presence or absence of data)?Hope you can see trough the fog of my confusion. Thank you for your time.(Win2K AdvServ + SQLServ2K)"