I am running stuck in something I can't get my head around. I have some mock-up data to simulate: DECLARE @tbl TABLE (orderReference VARCHAR(50), shi ...
I am running stuck in something I can't get my head around. I have some mock-up data to simulate: DECLARE @tbl TABLE (orderReference VARCHAR(50), shi ...
I am using an older version of SQL Server and trying to convert rows to concatenated columns. From researching here on stack overflow I see that I sho ...
I want to generate a XML file using a specific query. The main issue is that when I generate the XML, the output would look like this: The main pro ...
With T-SQL (I cannot use C# or any other scripting language due to application limitations) I am 'building' an XML message to post to a webservice. A ...
I have a table from which i am generating XML using below code Here text column has value as Horse & Horse but in the output xml it is c ...
I'm working in SQL Server 2014, and I have the following simple data, which tracks calling history of users: I need to group the ACTIVITY values in ...
I'm working with a masked database on my QA server using SQL Server Standard (64-bit) 14.0.1000.169. This is my structure: CREATE TABLE [dbo].[Te ...
I'm having an issue to create XML nodes. Help is much appreciated ! This is a sample code above code creates this output: I want to get the "pa ...
I would like to save the output from the query below into a variable or a table. However it gives an error because the query starts with "With namespa ...
looking for a little help with calculating a value from XML data in a BI Publisher template. I'm trying to say "If percentage column isn't null, then ...
How can I make FOR XML PATH return elements when my query returns an empty result? This is what my query looks like: DECLARE @StatementNumbe ...
I am trying to generate XML based on an SQL Server Schema. I have followed a few references including: (How to convert database table structure to XML ...
I'm currently working on Data Discovery and Classification and I have a query that allows me to see a preview of the data while doing the classificati ...
I am trying to get from the following SQL table the following result --> p1=zzzz.jpg&p2=yyyy.jpg&p3=aaaa.jpg I have tried but i cant ...
I am trying to group by ID and aggregate multiple comments into a single row Right now, I can do the no. 2 part for a single ID (ID = 1006), ...
I am using the FOR XML PATH function in order to concatenate multiple columns into a single row. However, I can't figure out how to alias the column n ...
I'm having a problem with sql query. What i'm trying to do is to get list of stores with tasks assigned on users in it. Each role in separated column ...
I'm pulling Chapter Titles, Section Titles, and Questions from my tables to make a table of contents. I am using Caspio's low code platform, which run ...
Please help me to get united rows and list of accounts separated by commas in table. I don't quite understand how to use "Stuff and 'For Xml Path'" fo ...
Short version Using SQL Server FOR XML ROOT('Customers'), how to I add attributes to that root node? Long Version When using FOR XML in SQL Serve ...