Skip to content

Transact-SQL Cookbook Help for Database Programmers

Best in textbook rentals since 2012!

ISBN-10: 1565927567

ISBN-13: 9781565927568

Edition: 2002

Authors: Ales Spetic, Jonathan Gennick

List price: $39.99
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Description:

This unique cookbook contains a wealth of solutions to problems that SQL programmers face all the time. The recipes inside range from how to perform simple tasks, like importing external data, to ways of handling issues that are more complicated, like set algebra. Authors Ales Spetic and Jonathan Gennick, two authorities with extensive database and SQL programming experience, include a discussion with each recipe to explain the logic and concepts underlying the solution. SQL (Structured Query Language) is the closest thing to a standard query language that currently exists, and Transact-SQL -- a full-featured programming language that dramatically extends the power of SQL -- is the…    
Customers also bought

Book details

List price: $39.99
Copyright year: 2002
Publisher: O'Reilly Media, Incorporated
Publication date: 4/9/2002
Binding: Paperback
Pages: 304
Size: 6.97" wide x 9.13" long x 0.79" tall
Weight: 1.100
Language: English

Jonathan Gennick is an O'Reilly & Associates editor specializing in database and programming titles. Prior to joining O'Reilly, Jonathan amassed some 17 years of programming and database management experience. During the latter part of his career he specialized in relational database programming, and more recently in database management. Jonathan got his start with relational database systems in 1990, first working with Ingres, and later with Digital's Rdb software. During that period he developed a fondness for SQL, and for the challenge of applying SQL creatively in ways that leveraged it's set-oriented capabilities. In 1994 Jonathan made the leap to Oracle, and is now often found writing…    

Preface
Pivot Tables
Using a Pivot Table
Sets
Introduction
The Students Example
Implementing Set Difference
Comparing Two Sets for Equality
Implementing Partial Intersection
Implementing Full Intersection
Classifying Subsets
Summarizing Classes of Sets
Aggregating Aggregates
Summarizing Aggregated Classes
Including Nonaggregated Columns
Finding the Top N Values in a Set
Reporting the Size of a Set's Complement
Finding the Complement of a Set
Finding the Complement of a Missing Set
Finding Complements of Sets with Different Universes
Comparing a Set with Its Universe
Dynamic Classification System
Data Structures
Types of Data Structures
Working Example
Finding Regions
Reporting Region Boundaries
Limiting Region Size
Ranking Regions by Size
Working with Sequences
Working with Runs
Cumulative Aggregates in Lists
Implementing a Stack
Implementing Queues
Implementing Priority Queues
Comparing Two Rows in an Array
Printing Matrices and Arrays
Transposing a Matrix
Calculating a Matrix Trace
Comparing Two Matrices for Size
Adding and Subtracting Matrices
Multiplying Matrices
Hierarchies in SQL
Types of Hierachies
Creating a Permission Hierarchy
Changing Individual Permissions
Adding New Individual Permissions
Centralizing Authorization Logic
Implementing General Hierarchies
Traversing Hierarchies Recursively
Manipulating Hierarchies Recursively
Aggregating Hierarchies
Preparing Multilevel Operations
Aggregating Hierarchies Revised
Temporal Data
Introduction
The Schedules Example
Enforcing Granularity Rules
Storing Out-of-Range Temporal Values
Deriving the First and Last Dates of the Month
Printing Calendars
Calculating Durations
Reporting Durations
Querying Periods
Querying Periods and Respecting Granularity
Finding Available Periods
Finding Common Available Periods
Excluding Recurrent Events
Excluding Nonrecurring Events
Finding Continuous Periods
Using Calendar Information with Periods
Using Calendar Information with Durations
Audit Logging
Audit Logs
The Warehouse Example
Row-Level Logging
Reporting Log Events
Generating Current Snapshots
Generating Time-Restricted Snapshots
Undoing Table Changes
Minimizing Audit-Log Space Consumption
Online Account Balancing
Activity-Level Logging
Partitioning Large Log Tables
Server Push
Importing and Transforming Data
Considerations When Importing Data
Working Examples
Importing External Data
Importing Data into a Live System
Importing with a Single Procedure
Hiding the Import Procedure
Folding Tables
Pivoting Tables
Joining Arrays with Tables
Joining Arrays with Master Tables
Joining Arrays with Multiple Master Records
Extracting Master Records from Tables
Generating Master Records Online
Working with Duplicates
Statistics in SQL
Statistical Concepts
The Light-Bulb Factory Example
Calculating a Mean
Calculating a Mode
Calculating a Median
Calculating Standard Deviation, Variance, and Standard Error
Building Confidence Intervals
Calculating Correlation
Exploring Patterns with Autocorrelation
Using a Simple Moving Average
Extending Moving Averages
The T-Distribution Table
Index