|
|
Working with Computed column in SQL Server 2000
|
Total Hit (1541) |
There are restriction for ALTER COLUMN, documented in Books Online (see end
of this post). Depending on your particular situation, you need to DROP
INDEX, ALTER TABLE... DROP CONSTRAINT etc.
The altered column cannot be:
a) A column with a text, image, ntext, or timestamp data type.
....Read More |
Rating
|
|
|
|
Selective Defrag/Reindex and Log
|
Total Hit (3117) |
SQL 2000 Only
This script will create a stored procedure and a table in the master database. Simply run the stored procedure and supply a database name as a parameter. It will do the following:
1. Gather/Log DBCC SHOWCONTIG statistics (pre defrag)
2. Defragment all user indexes in the dat
....Read More |
Rating
|
|
|
String User-Defined Functions
|
Total Hit (2623) |
Introduction
String UDFs
StrIns
StrDel
StrSeparate
StrCHARINDEX
StrREPLACE
StrREVERSE
«B»Introduction«/B»
I would like to write the series of articles about useful User-Defined Functions grouped by the following categories:
==>Date and Time User-Defined Functions
==>Mat
....Read More |
Rating
|
|
|
|
|
Meta Data User-Defined Functions
|
Total Hit (2599) |
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
|
|
|
|
|
|
|
How to find start/end date of Previous Quarter
|
Total Hit (3344) |
«code LangId=6»declare @PrevQtrDate datetime
declare @PrevQtrStartDate datetime,@PrevQtrEndDate datetime
declare @ReportDate datetime
set @ReportDate=getdate()
set @PrevQtrDate=dateadd(q,-1,@ReportDate)
Print @PrevQtrDate
set @PrevQtrStartDate=cast(month(@PrevQtrDate) as varchar(10)) + '
....Read More |
Rating
|
|
|
Understanding the TOP WITH TIES clause in SELECT queries
|
Total Hit (3031) |
The SELECT TOP N query always return exactly N records, and arbitrarily drops any record that have the same value as the last record in the group. To see what this means in practice, execute the following query against the Pubs database in SQL Server 7.0:
«Code LangId=6»
SELECT TOP 5 price, titl
....Read More |
Rating
|
|
|
Working with COM objects from within T-SQL
|
Total Hit (4621) |
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
|
|
|
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 (757) |
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
|
|
|
Introduction to SQL : Sample chapter from Beginning SQL Programming
|
Total Hit (693) |
This introductory chapter covers topics that students usually ask in the first hour of classes; essentially, just what do we mean by SQL? We start by explaining what SQL is and also what it is not, and we provide a brief overview of the history of the language. We'll also clarify some confusing term
....Read More |
Rating
|
|
|
MDX Essentials: Structure of the MDX Data Model
|
Total Hit (652) |
This is the second article of the series, MDX Essentials. The primary focus of this series will be an introduction to the MDX language. The series is designed to provide hands-on application of the fundamentals of the Multidimensional Expressions (MDX) language, with each tutorial progressively addi
....Read More |
Rating
|
|
|
|
|
Linking SQL Server to Heterogeneous Systems
|
Total Hit (1971) |
The ability to link SQL Server to heterogeneous systems such as Oracle, DB2, Sybase, etc., is imminent. This article provides the basic and most important information required to make a linked server connection to heterogeneous systems from SQL Server. We are going to deal with three different RBBMS
....Read More |
Rating
|
|
|
|
|
|
Introduction to Data Mining with SQL Server
|
Total Hit (2766) |
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
|
|
|
|
SQL Server Full Text Search Optimization
|
Total Hit (1701) |
Full text indexing is a great feature that solves a long running database problem, the searching of textual data columns for specific words and phrases in SQL Server databases.
|
Rating
|
|
|
Replication and Microsoft SQL Server 2000
|
Total Hit (1926) |
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
|
|