|
Minimum value from 4 variables - datetime example.
|
Total Hit (2066) |
This scripts shows how to obtain minimum value of four 4 datatime values contained in local variables. This method can be adapted to any datatye supported by the the SQL Server MIN function. This technique basically eliminates the writing of series of IF..ELSE or CASE statements.
....Read More |
Rating
|
|
|
|
|
|
|
Working with COM objects from within T-SQL
|
Total Hit (4616) |
This article includes
- Introduction
- General concepts
- OLE Automation Stored Procedures
«OL»«LI»sp_OACreate
«LI»sp_OADestroy
«LI»sp_OAGetProperty
«LI»sp_OASetProperty
«LI»sp_OAMethod
«LI»sp_OAGetErrorInfo
«LI»sp_OAStop«/OL»
- Example: generate script
- Literature
------
....Read More |
Rating
|
|
|
|
Updating Derived Columns using Triggers
|
Total Hit (1638) |
INSTEAD OF triggers are also commonly used to UPDATE the base columns in calculated columns. For example, assume that a view exists called vwOrdersOrderDetailsProducts as shown here:
«Code LangId=6»
CREATE VIEW vwOrdersOrderDetailsProducts
AS
SELECT o.OrderID,
o.OrderDate,
....Read More |
Rating
|
|
|
How to display COM error description in SQL Stored procedure ?
|
Total Hit (3387) |
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
|
|
|
Meta Data User-Defined Functions
|
Total Hit (2593) |
Introduction
Meta Data UDFs
COL_LENGTH2
COL_ID
INDEX_ID
INDEX_COL2
ROW_COUNT
--------------------------------------------------------------------------------
Introduction
I would like to write the series of articles about useful User-Defined Functions grouped by the following
....Read More |
Rating
|
|
|
Rotate a Table in SQL Server
|
Total Hit (1651) |
This article describes how to rotate a SQL Server table. Suppose you have a table that is named QTRSALES. The table has the columns YEAR, QUARTER, and AMOUNT with the data in the following format (note that there is no row for the fourth quarter of 1996):
Year Quarter Amount
------
....Read More |
Rating
|
|
|
Null values in WHERE clauses
|
Total Hit (3155) |
A SELECT query returns all the rows for which the WHERE clause returns True. However, many developer - especially those accustomed to other programming languages, such as VB - get confused on this point, and assume that the query returns the rows for which the WHERE clause returns any non-False valu
....Read More |
Rating
|
|
|
|
How to add/configure a new Linked server using T-SQL
|
Total Hit (8391) |
Here is the T-SQL script to add linked server using sp_addlinkedserver SP. Once you add linked server you can add login using sp_addlinkedsrvlogin. By default current login is mapped with linked server means remote machine must have exact same login with same password in order to get access to the l
....Read More |
Rating
|
|
|
|
|
|
XPSMTP.DLL - SQL Server SMTP Mail XP
|
Total Hit (678) |
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
|
|
|
|
|
XML and SQL 2000 (Part 1)
|
Total Hit (1202) |
One of the most common problems with managing data is its versatility. This becomes evident when exchanging data between multiple data sources and results mainly from incompatibilities in data representation and format. The impact of this type of problem affects most companies internally, but is eve
....Read More |
Rating
|
|
|
Cursors: An Overview
|
Total Hit (1124) |
We'll talk about the basics of cursors. These let you move through records one at a time and perform processing on each record.
|
Rating
|
|
|
|
How to Decipher/Understand SSIS Error Code?
|
Total Hit (953) |
If you have worked with SSIS, you may have been doing something like this, in case of errors, you saved the error code and the error column to a text file or some other media.
|
Rating
|
|
|
Introduction to Data Mining with SQL Server
|
Total Hit (2760) |
In order to fully comprehend, much less implement enhanced Decision Support Systems in an organization, it is necessary to understand the basic precepts behind the requirements, methodologies and business drive to obtain information. Information about an organization gathered from various sources an
....Read More |
Rating
|
|
|
Replication and Microsoft SQL Server 2000
|
Total Hit (1923) |
Data Replication is a powerful feature of SQL Server. SQL Server 7.0 provided many improvements from previous versions, and SQL Server 2000 builds on those features and adds more to increase the reliability, ease of use, and management of replication.
....Read More |
Rating
|
|
|
|
MDX in Analysis Services: Retrieve Data from Multiple Cubes
|
Total Hit (875) |
This is the fourth tutorial article of the series, MDX in Analysis Services. The series is designed to provide hands-on application of the fundamentals of MDX from the perspective of MS SQL Server 2000 Analysis Services (to which I will refer in most cases as simply "Analysis Services," to save time
....Read More |
Rating
|
|
|
Changing the DTS Send Mail Task
|
Total Hit (724) |
This is a simple example of using an ActiveX Script Task to dynamically change the main properties of a DTS Send Mail task. First set the message subject to the same name as the package. The body of the message is a combination of a static string and a global variable value. Finally we read the file
....Read More |
Rating
|
|
|
Processing The Same Row More Than Once
|
Total Hit (756) |
In his SQL Server Magazine article of August 2002 Itzik Ben-Gan shows us how to use Transact SQL to normalise lab test results from a fictional wine maker using either functions in SQL Server 2000 or Transact SQL gymnastics in Version 7. In this article we're going to show you how to do the exact sa
....Read More |
Rating
|
|