Scripts

Technical Article

Selecting XML out

I have a table with multiple rows for Description belonging to one Heading. For each row of data I need a .The xml should look like this: A heading 234567890123456789010 234567890123456789010 234567890123456789010   ...(to ) A heading 234567890123456789010 234567890123456789010   ...(to )

You rated this post out of 5. Change rating

2003-10-03

293 reads

Technical Article

Creating a Dynamic Crosstab Query

Crosstab queries (also called "pivot tables") in which you know beforehand the number of column values to aggregate by, can easily be performed in T-SQL using CASE statements wrapped in the SUM function.  Where things get tricky, however, is when you don't know how many aggregation values exist, and you are required to write a […]

5 (2)

You rated this post out of 5. Change rating

2003-09-26

3,609 reads

Technical Article

SP_HELPTEXT Modified for XML

This is the standard sp_helptext from SQL Server 2000 modified slightly to return the object definition as an XML document.The document is structured in the following format:I admit it was not a lot of work since I merely modified the final SELECT statement from Microsoft's own procedure, but I still find this very useful.The only […]

You rated this post out of 5. Change rating

2003-09-26

202 reads

Blogs

Azure SQL offerings

By

There are three Azure SQL products with so many different deployment options, service tiers,...

T-SQL Tuesday #183 Roundup

By

I hosted this month’s T-SQL Tuesday party with my invitation asking about tracking permissions....

A Little Brainstorming with an AI

By

I was asked to do some a little thinking and brainstorming recently. Rather than...

Read the latest Blogs

Forums

MEMORYBROKER_FOR_RESERVE experience

By tony28

Hi, Does anyone have experience with MEMORYBROKER_FOR_RESERVE ? when suddenly there is somehow constantly...

Moving Database Files

By Ahr Aitch

I just learned that my database was created on my C:\ drive in the...

Migrate MSSQL to MYSQL - Different Servers

By cajun_sql

I am needing to migrate a MSSQL db to MySQL, on a different server...

Visit the forum

Question of the Day

Mixed Backups

I have a complex database with a few filegroups and files. Can I run a backup command like this? (assume file/filegroup names are valid).

BACKUP DATABASE [complex]
    FILE = N'thirdone'
 ,  FILE = N'thirdtwo'
 ,  FILEGROUP = N'second' 
 TO  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL16.SQL2022\MSSQL\Backup\complex.bak' 
 WITH NOFORMAT, NOINIT,  NAME = N'complex-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

See possible answers