Basic Teradata Query Reference

Basic Teradata Query

Reference

Release 13.10 B035-2414-020A

February 2010

The product or products described in this book are licensed products of Teradata Corporation or its affiliates.

Teradata, BYNET, DBC/1012, DecisionCast, DecisionFlow, DecisionPoint, Eye logo design, InfoWise, Meta Warehouse, MyCommerce, SeeChain, SeeCommerce, SeeRisk, Teradata Decision Experts, Teradata Source Experts, WebAnalyst, and You've Never Seen Your Business Like This Before are trademarks or registered trademarks of Teradata Corporation or its affiliates. Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc. AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc. BakBone and NetVault are trademarks or registered trademarks of BakBone Software, Inc. EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation. GoldenGate is a trademark of GoldenGate Software, Inc. Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company. Intel, Pentium, and XEON are registered trademarks of Intel Corporation. IBM, CICS, RACF, Tivoli, and z/OS are registered trademarks of International Business Machines Corporation. Linux is a registered trademark of Linus Torvalds. LSI and Engenio are registered trademarks of LSI Corporation. Microsoft, Active Directory, Windows, Windows NT, and Windows Server are registered trademarks of Microsoft Corporation in the United States and other countries. Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries. QLogic and SANbox are trademarks or registered trademarks of QLogic Corporation. SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc. SPARC is a registered trademark of SPARC International, Inc. Sun Microsystems, Solaris, Sun, and Sun Java are trademarks or registered trademarks of Sun Microsystems, Inc., in the United States and other countries. Symantec, NetBackup, and VERITAS are trademarks or registered trademarks of Symantec Corporation or its affiliates in the United States and other countries. Unicode is a collective membership mark and a service mark of Unicode, Inc. UNIX is a registered trademark of The Open Group in the United States and other countries. Other product and company names mentioned herein may be the trademarks of their respective owners.

THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED ON AN "AS-IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. IN NO EVENT WILL TERADATA CORPORATION BE LIABLE FOR ANY INDIRECT, DIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS OR LOST SAVINGS, EVEN IF EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

The information contained in this document may contain references or cross-references to features, functions, products, or services that are not announced or available in your country. Such references do not imply that Teradata Corporation intends to announce such features, functions, products, or services in your country. Please consult your local Teradata Corporation representative for those features, functions, products, or services available in your country. Information contained in this document may contain technical inaccuracies or typographical errors. Information may be changed or updated without notice. Teradata Corporation may also make improvements or changes in the products or services described in this information at any time without notice. To maintain the quality of our products and services, we would like your comments on the accuracy, clarity, organization, and value of this document. Please e-mail: teradata-books@lists. Any comments or materials (collectively referred to as "Feedback") sent to Teradata Corporation will be deemed non-confidential. Teradata Corporation will have no obligation of any kind with respect to Feedback and will be free to use, reproduce, disclose, exhibit, display, transform, create derivative works of, and distribute the Feedback and derivative works thereof without limitation on a royalty-free basis. Further, Teradata Corporation will be free to use any ideas, concepts, know-how, or techniques contained in such Feedback for any purpose whatsoever, including developing, manufacturing, or marketing products or services incorporating Feedback. Copyright ? 1984-2010 by Teradata Corporation. All Rights Reserved.

Preface

Purpose

This book provides information about Basic Teradata Query (BTEQ), which is a Teradata? Tools and Utilities product. Teradata Tools and Utilities is a group of products designed to work with Teradata Database. Teradata BTEQ software is a general-purpose, command-based program that allows users on a workstation to communicate with one or more Teradata Database systems, and to format reports for both print and screen output.

Audience

This book is intended for use by: ? Anyone who uses BTEQ to access Teradata Database on a regular basis ? System administrators ? Database administrators ? Anyone responsible for creating and maintaining operational scripts and macros.

Supported Releases

This book supports the following releases: ? Teradata Database 13.10 ? Teradata Tools and Utilities 13.10 ? BTEQ 13.10

Note: See "Determining the Current Version of BTEQ" on page 24 to verify the Basic Teradata Query version number. To locate detailed supported-release information: 1 Go to . 2 Click General Search under Online Publications. 3 Type 3119 in the Publication Product ID box. 4 Under Sort By, select Date. 5 Click Search.

Basic Teradata Query Reference

3

Preface Prerequisites

6 Open the version of the Teradata Tools and Utilities ##.# Supported Platforms and Product Versions spreadsheet associated with this release.

The spreadsheet includes supported Teradata Database versions, platforms, and product release numbers.

Prerequisites

The following prerequisite knowledge is required for this product: ? Because much of this book is devoted to client channels, networks, and channel- and

network-attached computers, you should be familiar with the operations of your channelor network-attached clients and the systems installed on them.

Changes to This Book

The following changes were made to this book in support of the current release. Changes are marked with change bars. For a complete list of changes to the product, see the Release Definition associated with this release.

Date and Release February 2010 Release 13.10

Description

? Support on the MP-RAS and z/VM operating systems has been discontinued.

? Updated syntax diagrams for LOGON and LOGOFF ? Added an example of how to use .OS to change the console window title

when using Windows BTEQ.

? File names must be enclosed in quotation marks when text follows the file name.

? Added a table to the REPORTALIGN command to help explain the effect of the command.

? Encoding controls for Unicode sessions have been added. ? The effect of EXPORT RESET on WIDTH has been clarified ? Support for IPv6 has been added. ? An example of changing the window title has been included. ? An example of suppressing title text and dashes for an exported report

has been included.

4

Basic Teradata Query Reference

Preface Additional Information

Date and Release August 2008 13.00

Description

Included the following for BTEQ Release 13.00.00:

? Updated and corrected examples in the "TDP"command.

? Added syntax examples to the "LOGON" command for use of the accountid value as part of an interactive logon.

? Corrected miscellaneous information related to the Defaults, Show Controls, and Teradata SQL macro information in Chapters 3 and 5.

? Provided 64-bit specific information in the "NOTIFY" command.

? Explained suggested use for Teradata SQL's TOP operator in the "RETLIMIT" command.

? Removed AXSMOD examples referring to TNTBAR in the "EXPORT" and "IMPORT" commands.

? Added clarification of ERRORLEVEL as used in the IF statement condition. See "Testing Example".

? Added note regarding how BTEQ handles Unicode scripts. See "Defining Input and Output Files".

? Extended the BOM/NOBOM option for the "EXPORT" Command Channel-attached systems syntax diagram to include REPORT and DIF exports.

? Updated text in Chapter 4 and Chapter 5 to handle a Unicode SEPARATOR command string.

? Updated operating system references to z/VM and z/OS to reflect current information.

? Removed specific operating system information from Chapter 1; readers are now referred to release spreadsheet for most accurate information.

? Added cautionary note to "IMPORT" command; updated Usage Note regarding the VARTEXT keyword.

? Added clarification to "EXPORT" Command Usage Notes regarding BTEQ incorrectly decreasing stdout WIDTH for UTF 16 session charset.

? Removed non-useful revision levels from SHOW VERSIONS results in "SHOW VERSIONS".

? BTEQ now allows more than 2048 columns to be selected. This affects the RETLIMIT command and the buffers it helps to define. Updates have been made to the "RETLIMIT", "SHOW CONTROLS". and "DEFAULTS" commands.

Additional Information

Additional information that supports this product and Teradata Tools and Utilities is available at the web sites listed in the table that follows. In the table, mmyx represents the publication date of a manual, where mm is the month, y is the last digit of the year, and x is an internal publication code. Match the mmy of a related publication to the date on the cover of this book. This ensures that the publication selected supports the same release.

Basic Teradata Query Reference

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download