sp_MSTableSpace and sp_MSforeachtable combined
The following stript combines two previous articals. sp_MStablespace was being demonstrated with a cursor. To reduce the code the sp_MSforeachtable could be used.
2003-07-08
539 reads
The following stript combines two previous articals. sp_MStablespace was being demonstrated with a cursor. To reduce the code the sp_MSforeachtable could be used.
2003-07-08
539 reads
By Patrick
SQL Server Audit is an efficient way to track and log events that occur...
I presented at SQL Saturday Pittshburgh this past weekend about populating your data warehouse...
By Steve Jones
A customer was asking recently about the RPO for their estate, and I showed...
Hi everyone, I have a table as below, I would like to strip out...
From this link - https://stackoverflow.com/questions/22005698/how-to-find-all-the-dependencies-of-a-table-in-sql-server I can find all the child dependencies starting from my...
I've got some code that is supposed to generate a unique key by prefixing...
CREATE TABLE t0 ( id INT PRIMARY KEY , field1 VARCHAR(1000) , field2 VARCHAR(MAX)); INSERT INTO t0 SELECT gs.value , REPLICATE ('X', 1000) , REPLICATE ('Y', 1000) FROM generate_series(1, 10, 1) gs; GO
select STRING_AGG(field1, ';') within group (order by id) from t0;
select STRING_AGG(field2, ';') within group (order by id) from t0;