|
|
How to display COM error description in SQL Stored procedure ?
|
Total Hit (3401) |
When we deal with COM object using sp_OAxxxx stored procedure sometimes you need exact error description to Identify the problem. Here is the solution for this type of problem. sp_displayoaerrorinfo stored procedure will display any error encountered while executing sp_OAxxxx stored procedure.
....Read More |
Rating
|
|
|
How to drop all temp tables created by current connection.
|
Total Hit (7337) |
Few days ago I came up with one problem. I was tesing a script in query analyzer. This script was using several temp tables so every time I run this script I had to make sure that all temp tables are dropped before I run the script otherwise it will give bunch of errors. So I decided to write a proc
....Read More |
Rating
|
|
|
Stored procedure to set/reset columns's identity property
|
Total Hit (3396) |
You can use ALTER TABLE statement to add/remove column and to change some attributes of a column but there are some limitations with ALTER TABLE statement. You can not use ALTER TABLE to set a column as an identity column (Auto Increment field). You can ADD a new column with IDENTITY property but ca
....Read More |
Rating
|
|
|
|
Estimate the table size (Data + Index) for a given # of rows
|
Total Hit (2413) |
Ever tried to estimate the table total size which include data and index in calculation ? Believe me its not easy job to estimate the size of a table for a give # of rows.
Here is the kool SP which does it for you. Full credit goes to Sharon Dooley for his excellent Job.
«code LangId=6»if exis
....Read More |
Rating
|
|
|
|
How to create dynamic query without loosing performance.
|
Total Hit (1663) |
We all know that in sql server you can use exec or execute statement to execute dynamic sql statement which can be on the fly but the biggest drawback of executing dynamic query using execute is query plan is not chached by sql server and so you get poor performance if you hitting many tables and se
....Read More |
Rating
|
|
|
Serverside Paging using dynamic T-SQL
|
Total Hit (2033) |
This stored Procedure can page records for any specified query.
«code LangId=6»
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
/*
Description: Page a query. Query can have order by clause or it can pass separate orderby parameter
Examples:
=========================
[1] Defau
....Read More |
Rating
|
|
|
|
|
xp_regex: Regular Expressions in SQL Server 2000
|
Total Hit (619) |
Regular Expressions are probably the best tool for text parsing. Using Regular Expressions GREATLY simplifies anything for which you would normally use CHARINDEX, PATINDEX, SUBSTRING, STUFF, REPLACE, etc.
|
Rating
|
|
|
Implementing CRUD Operations Using Stored Procedures: Part 2
|
Total Hit (548) |
In database terms, CRUD stands for the four essential database operations: Create, Read, Update and Delete. To create a high performance system, these four operations should be implemented by stored procedures, each procedure implementing one of the four operations. This is the second in a two part
....Read More |
Rating
|
|
|
Implementing CRUD Operations Using Stored Procedures: Part 1
|
Total Hit (759) |
That's the American Heritage dictionary definition but not the database definition. When you are working with databases, CRUD is an acronym for the four essential database operations: Create, Read, Update, and Delete.
|
Rating
|
|
|
SQL Server Stored Procedures Administration
|
Total Hit (606) |
A stored procedure is a precompiled collection of Transact-SQL statements stored under a name and processed as a unit that you can call from within another Transact-SQL statement or from the client applications.
|
Rating
|
|
|
Minimizing SQL Server Stored Procedure Recompiles
|
Total Hit (701) |
This article discusses the reasons that SQL Server 2000 decides to recompile a stored procedure and demonstrates techniques that can be used to minimize recompilation. If your system makes extensive use of stored procedures, minimizing recompilation can give you a nice boost in performance.
....Read More |
Rating
|
|
|
|
XPSMTP.DLL - SQL Server SMTP Mail XP
|
Total Hit (685) |
XPSMTP provides a SMTP based SQL Mail solution for sending MIME based email over SMTP, implemented as an Extended Stored Procedure.
It does not require any software to be installed, just a SMTP email server that can handle the outgoing mail request. XPSMTP is using TCP/IP sockets to communicate
....Read More |
Rating
|
|
|
Implementing Error Handling with Stored Procedures
|
Total Hit (635) |
This is one of two articles about error handling in SQL Server. This article gives you recommendations for how you should implement error handling when you write stored procedures, including when you call them from ADO.
|
Rating
|
|
|
The Curse and Blessings of Dynamic SQL
|
Total Hit (765) |
In this article I will discuss the of use dynamic SQL in stored procedures in MS SQL Server, and I will show that this is a powerful feature that you should use with care.
|
Rating
|
|
|
How to share data between stored procedures
|
Total Hit (704) |
Questions you often see in newsgroups about MS SQL Server are: How can I use the result set from one stored procedure in another or How can I use the result set from a stored procedure in a SELECT statement?
|
Rating
|
|