|
Serverside Paging using dynamic T-SQL
|
Total Hit (2027) |
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
|
|
|
Backup and Restore of SQL Server database using easy script.
|
Total Hit (2769) |
In this article I will show you the most common backup/restore commands.
- How to take full backup of a SQL Server database.
- How to resore full backup over the existing/new database.
- How to restore full backup at different path over existing/new database.
<b>How to take full backup of a
....Read More |
Rating
|
|
|
|
SQL Server Reprting Services (SSRS) Report Design Tips and Tricks
|
Total Hit (3856) |
This white paper covers best practices on report design and helps you avoid common mistakes when choosing a report layout and output format. Take advantage of existing product features to achieve the results you want. The paper includes report and code examples that implement functionality that is f
....Read More |
Rating
|
|
|
|
|
|
ADO like Cursor operations using T-SQL
|
Total Hit (1763) |
This article shows how to use SQL cursor to perform MoveFirst, MoveLast, MoveNext, MovePrev and MoveAbsolute operations using T-SQL's SCROLL CURSOR
|
Rating
|
|
|
Mathematical User-Defined Functions
|
Total Hit (2612) |
Introduction
Mathematical UDFs
Factorial
PercentFrom
PercentValue
Degree
Allocation
Combination
--------------------------------------------------------------------------------
Introduction
I would like to write the series of articles about useful User-Defined Functions gro
....Read More |
Rating
|
|
|
Displaying random data from SQL table
|
Total Hit (2788) |
Following query will display any 5 random rows from Products table of Northwind database
NewId() function genereates New GUID.......Try this code it works fine
«Code LangId=6»
select top 5 * from products order by NewId() «/Code»
|
Rating
|
|
|
|
|
Finding SQL Server Object Name from PageNumber
|
Total Hit (6601) |
Most of time when sql server throw an error will tell you object Id or PageNumber.
This article will show you how to find which object caused the error.
«b»Step-By-Step Example«/b»
Lets say you got the folloing error from SQL Server
«b»Error«/b»
«font color=red»Error: 7105, Severity:
....Read More |
Rating
|
|
|
Find out the nth highest number in a column.
|
Total Hit (2638) |
Ever wondered how to find out the second highest salary from the employees table? Or how to find out the third oldest employee in the company? Here is a stored procedure which accepts the table name, column name, and nth number and displays the nth highest number from the given column.
....Read More |
Rating
|
|
|
How to search all columns of all tables in a database for a keyword?
|
Total Hit (3509) |
While browsing the SQL Server newsgroups, every once in a while, I see a request for a script that can search all the columns of all the tables in a given database for a specific keyword. I never took such posts seriously. But then recently, one of my network administrators was troubleshooting a pro
....Read More |
Rating
|
|
|
Full-text indexing: Advanced Queries
|
Total Hit (2512) |
In our first two parts we covered creating a full-text index, updating the index and some basic queries. In this segment we'll cover some of the more advanced topics. The first is ranking the results we recieve. We do this using the CONTAINSTABLE statement. An sample query and result set are shown b
....Read More |
Rating
|
|
|
Tutorial : Building a Package in the DTS Designer
|
Total Hit (710) |
The point of this tutorial is to give us an introduction to the DTS designer. If you're serious about DTS or want to explore more of its many features then it won't be long before you end up here. This tutorial was created using SQL Server 2000 but users of SQL Server 7 will still find it useful. Wh
....Read More |
Rating
|
|
|
SSIS Script Task Variable Write Example (Using LockOneForWrite)
|
Total Hit (1689) |
I had some difficulty finding a succinct code example for how to change the value of a variable in a SQL Server 2005 SSIS Script task, so I thought I would add one here now that I think I've figured it out. (Is anyone besides me disappointed by the lack of examples in the Books Online and Help?)
....Read More |
Rating
|
|
|
Control your SQL Server 7.0 and 2000 via E-Mail
|
Total Hit (905) |
Data Base Administrators are often exposed to a situation where they want to query a table, check on the status of a server, check an error log or run a DBCC command on a SQL Server box when they do not have access to the box directly. This often happens when they are off site or on vacation or they
....Read More |
Rating
|
|
|
Data Warehouse Design Considerations - 1
|
Total Hit (1441) |
Data warehousing is one of the more powerful tools available to support a business enterprise. Learn how to design and implement a data warehouse database with Microsoft SQL Server 2000.
|
Rating
|
|
|
Global Variables and Stored Procedure Parameters
|
Total Hit (600) |
One of the benefits of the SQL Server 2000 is that the SQL tasks support mapping of global variables to parameter placeholders within the SQL. This means you can use the global variable as an input parameter for your stored procedure.
|
Rating
|
|
|
Formatting Character Data into Datetime fields
|
Total Hit (635) |
When building tables people quite often use character fields to hold dates. A style that is quite often used to format the date is this yyyymmdd. When we come to take this data into a field of say smalldatetime then we can encounter errors.
|
Rating
|
|
|
Commonly used expressions in SQL Reporting Services
|
Total Hit (1110) |
Some expressions are commonly used in reports. These include expressions to change the appearance of data in a report, change properties of report items, and affect how data is retrieved. This topic describes some expressions that can be used for common tasks within a report.
....Read More |
Rating
|
|
|
Cubes in the Real World
|
Total Hit (1708) |
Microsoft® SQL Server™ 2000 Analysis Services offers myriad options for creating cubes, and the flexibility and power to support almost any business case. This chapter presents practical guidelines for designing cubes and dimensions, design fundamentals, and other considerations
....Read More |
Rating
|
|
|
|
Export a Table to a Date Stamped File Name in SQL Server
|
Total Hit (1132) |
Date stamping is a very common requirement in the IT industry for any data extract created. Through the DTS package with ActiveX script, it is very easy to date stamp a file. In this article, I am going to walk you through how to export a table to a date stamped file.
....Read More |
Rating
|
|
|
|
SQL Server Security Checklist
|
Total Hit (2555) |
This month we are going to look at the subject of security. The article is not an in depth tutorial, and is in no way comprehensive. Instead, what I have tried to do is to simply highlight some of the areas where many people (myself included) commonly leave gaps in their security.
....Read More |
Rating
|
|
|
How can I change the source data file for a Bulk Insert Task
|
Total Hit (608) |
To change the name of the source data file at runtime you can use an ActiveX Script Task. In the following example the new filename is read from a global variable called ImportFilename. Please ensure you change the bulk insert task's name value ("DTSTask_DTSBulkInsertTask_1") to match that in your p
....Read More |
Rating
|
|
|
The Curse and Blessings of Dynamic SQL
|
Total Hit (761) |
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
|
|