Creating a PDF from a Stored Procedure in SQL Server
A short but interesting article, the author has figured out a way to create a PDF from a stored procedure without using a third party library.
2019-09-20 (first published: 2003-08-26)
74,223 reads
A short but interesting article, the author has figured out a way to create a PDF from a stored procedure without using a third party library.
2019-09-20 (first published: 2003-08-26)
74,223 reads
This a script to compare two parallel data streams, in my case production and QA. Two extracts were created and a mapping table was created as a look-up between old and new recordids. A final table TestResults was created to hold the results of the comparison. The comparison table names and join syntax are controlled […]
2003-08-21
161 reads
This script will display the defragmentation of table(s) all indexes of selected tables and display a table/list of the DBCC SHOWCONTIG. It will aslo will report if there are tables in the list that can't be found in the current database. Run the script in the database where the tables you want to check are.Check […]
2003-08-21
793 reads
This script will record all the rows in all tables of the database it's run on. Then, at each execution, it will compare the rows to what they originally were and display those that are different (inserts or deletes):
2003-08-20
304 reads
SQL 2000's sp_MSForEachDB and sp_MSForEachTable are useful procedures for performing operations against multiple objects; however, they aren't always extremely efficient, because internally they use cursors to do their work.These 2 sprocs, sp_ForEachDB and sp_ForEachTable, perform many of the same tasks as their Microsoft-shipped twins, but run faster because they dynamically build the SQL string without […]
2003-08-19
2,279 reads
These four scripts list concise information about all Default, Check, Unique, Foreign Key, and Primary Key constraints for the database in which they are run. With minor column modifications, they could easily be unioned to provide a single list. The usual caveat applies about directly accessing system tables. They may change in future versions and/or […]
2003-08-14
1,116 reads
This script returns a description of the database with references to all tables in the database with keys listed. If the column description has been filled out the listing includes that text.If you want to get a report on the structure of each database, just add this script to each database, and then use a […]
2003-08-14
825 reads
Very simple and straightforward script that creates a temporary table and fills it with prime numbers from 1 to the upper bound you specify. May be useful for educational purposes or even some cryptography applications.
2003-08-14
154 reads
This little utility comes in handy if you do a lot of SQL coding. Given a table name, it'll return four results: The names of the columns, the names with their datatypes, the list of columns with each one set to an identically-named variable, and a list of variables with the same names as the […]
2003-08-12
212 reads
The authors of the application are offering a 30% discount off of the release price to those that participate in the beta cycle. Feature list includes autocomplete, db comparison and reconciling, and point/click constraint generation. (Not reviewed)
2003-08-08
552 reads
PlanTrace: Stop Reading Redshift EXPLAIN Plans. Start Seeing Them Introducing PlanTrace — a free, browser-based...
By Steve Jones
I went to sleep while reading a Kindle book on my phone. I know...
A conversation with Jan Laš, CIO at HOPI, about what deploying a data agent...
We suffered a SPAM attack from May 1-6, which unfortunately corresponded with time off...
Hi to all We have situation at a client where someone is illegally changing...
Hi to all We have situation at a client where someone is illegally changing...
I have this data in a table called dbo.NFLTeams
TeamID TeamName City YearEstablished ------ -------- ---- --------------- 1 Cowboys Dallas 1960 2 Eagles Philadelphia 1933 3 Packers Green Bay 1919 4 Chiefs Kansas City 1960 5 49ers San Francisco 1946 6 Broncos Denver 1960 7 Seahawks Seattle 1976 8 Patriots New England 1960If I run this code, how many rows are returned?
SELECT TOP 2
json_objectagg('Team' : TeamName)
FROM dbo.NFLTeams;
See possible answers