Teradata SQL Assistant for Microsoft Windows. User Guide



Similar documents
Teradata SQL Assistant for Microsoft Windows. User Guide

Teradata SQL Assistant for Microsoft Windows. User Guide

Teradata Query Scheduler. User Guide

Teradata SQL Assistant/Web Edition. User Guide

Teradata Business Intelligence Optimizer. Release Definition

OpenSSL Heartbleed Vulnerability Fix Procedure for Aster Database Versions 5.0.2x, 5.0.1, and 4.6.3x

Teradata Business Intelligence Optimizer. Release Definition

Aster Express Getting Started Guide

Teradata Tools and Utilities. Installation Guide for Microsoft Windows

Teradata Open Distribution for Hadoop Release Definition

Teradata Database. Security Administration

Teradata Manager. User Guide

Teradata AWS. User Guide

Teradata Alerts Installation, Configuration, and Upgrade Guide Release B K May 2013

Teradata Workload Analyzer. User Guide

Crystal Reports Installation Guide

Teradata SQL Assistant Version 13.0 (.Net) Enhancements and Differences. Mike Dempsey

Veritas Cluster Server Database Agent for Microsoft SQL Configuration Guide

User's Guide FairCom Performance Monitor

Teradata Tools and Utilities for Microsoft Windows Installation Guide Release B K March 2013

Business Intelligence Tutorial: Introduction to the Data Warehouse Center

Oracle Fusion Middleware

ADMINISTRATOR'S GUIDE. Version 12.20

USER MANUAL APPLICATION MONITOR. Version March 2015

Appliance Backup Utility Installation and User Guide Release B A December 2011

Teradata Database. SQL Reference. Stored Procedures and Embedded SQL

CONTACTS SYNCHRONIZER FOR IPAD USER GUIDE

MODULE 2: SMARTLIST, REPORTS AND INQUIRIES

Plug-In for Informatica Guide

-lead Grabber Business 2010 User Guide

JD Edwards EnterpriseOne Tools. 1 Understanding JD Edwards EnterpriseOne Business Intelligence Integration. 1.1 Oracle Business Intelligence

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

Tips and Tricks SAGE ACCPAC INTELLIGENCE

for Sage 100 ERP Business Insights Overview Document

BID2WIN Workshop. Advanced Report Writing

SAP Business Objects Business Intelligence platform Document Version: 4.1 Support Package Data Federation Administration Tool Guide

FileMaker 12. ODBC and JDBC Guide

Jet Data Manager 2012 User Guide

FileMaker 13. ODBC and JDBC Guide

Microsoft Dynamics GP. Audit Trails

Microsoft Dynamics GP. Engineering Data Management Integration Administrator s Guide

DiskPulse DISK CHANGE MONITOR

Business Intelligence Tutorial

HP Quality Center. Software Version: Microsoft Word Add-in Guide

VERITAS NetBackup 6.0

EMC Documentum Webtop

FileMaker 11. ODBC and JDBC Guide

Data Tool Platform SQL Development Tools

Setting Up ALERE with Client/Server Data

ODBC Client Driver Help Kepware, Inc.

HP OpenView AssetCenter

DCA. Document Control & Archiving USER S GUIDE

Business Portal for Microsoft Dynamics GP. Project Time and Expense Administrator s Guide Release 10.0

TIBCO Spotfire Automation Services 6.5. User s Manual

VERITAS Backup Exec TM 10.0 for Windows Servers

Open Workbench. User Guide. v2.0.00

ODBC Driver Version 4 Manual

DataPA OpenAnalytics End User Training

Decision Support AITS University Administration. Web Intelligence Rich Client 4.1 User Guide

InfoPrint 4247 Serial Matrix Printers. Remote Printer Management Utility For InfoPrint Serial Matrix Printers

Microsoft Dynamics GP Audit Trails

ORACLE BUSINESS INTELLIGENCE WORKSHOP

Legal Notes. Regarding Trademarks KYOCERA Document Solutions Inc.

IBM Configuring Rational Insight and later for Rational Asset Manager

Scribe Online Integration Services (IS) Tutorial

Simba ODBC Driver with SQL Connector for Apache Cassandra

Deploying Business Objects Crystal Reports Server on IBM InfoSphere Balanced Warehouse C-Class Solution for Windows

SQL Developer. User Manual. Version Copyright Jan Borchers All rights reserved.

How To Set Up Total Recall Web On A Microsoft Memorybook (For A Microtron)

Connectivity Pack for Microsoft Guide

NetBackup Backup, Archive, and Restore Getting Started Guide

Personal Call Manager User Guide. BCM Business Communications Manager

Centran Version 4 Getting Started Guide KABA MAS. Table Of Contents

Novell ZENworks Asset Management 7.5

NorthClark Computing, Inc. Bill of Material and Parts Master Maintenance. Administrator s Guide

MULTIFUNCTIONAL DIGITAL SYSTEMS. Operator s Manual for AddressBook Viewer

PaperClip32. Installation Guide. for Workgroup and Enterprise Editions. Document Revision 2.1 1

Dell Statistica Statistica Enterprise Installation Instructions

v6.1 Websense Enterprise Reporting Administrator s Guide

Security Explorer 9.5. User Guide

ibolt V3.2 Release Notes

Interworks. Interworks Cloud Platform Installation Guide

Legal Information Trademarks Licensing Disclaimer

Introduction to PASW Statistics

Simply Accounting Intelligence Tips and Tricks Booklet Vol. 1

Bitrix Site Manager ASP.NET. Installation Guide

Integration with Active Directory

PROMISE ARRAY MANAGEMENT (PAM) for

PowerLogic ION Enterprise 5.6

Almyta Control System Advanced Reference Contents

Scheduling Data Import from Avaya Communication Manager into Avaya Softconsole MasterDirectory

HP LaserJet MFP Analog Fax Accessory 300 Send Fax Driver Guide

unipaas V1.9c Release Notes

Results CRM 2012 User Manual

Enterprise Vault Installing and Configuring

BusinessObjects Enterprise InfoView User's Guide

NDA ISSUE 1 STOCK # CallCenterWorX-Enterprise IMX MAT Quick Reference Guide MAY, NEC America, Inc.

How To Load Data Into An Org Database Cloud Service - Multitenant Edition

Robot SCHEDULE 12 User Guide

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

Transcription:

Teradata SQL Assistant for Microsoft Windows User Guide Release 14.10 B035-2430-082K February 2013

The product or products described in this book are licensed products of Teradata Corporation or its affiliates. Teradata, Active Enterprise Intelligence, Applications-Within, Aprimo, Aprimo Marketing Studio, Aster, BYNET, Claraview, DecisionCast, Gridscale, MyCommerce, Raising Intelligence, Smarter. Faster. Wins., SQL-MapReduce, Teradata Decision Experts, "Teradata Labs" logo, "Teradata Raising Intelligence" logo, Teradata ServiceConnect, Teradata Source Experts, "Teradata The Best Decision Possible" logo, The Best Decision Possible, WebAnalyst, and Xkoto are trademarks or registered trademarks of Teradata Corporation or its affiliates in the United States and other countries. Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc. AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc. Apache, Apache Hadoop, Hadoop, and the yellow elephant logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Axeda is a registered trademark of Axeda Corporation. Axeda Agents, Axeda Applications, Axeda Policy Manager, Axeda Enterprise, Axeda Access, Axeda Software Management, Axeda Service, Axeda ServiceLink, and Firewall-Friendly are trademarks and Maximum Results and Maximum Support are servicemarks of Axeda Corporation. Data Domain, EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation. GoldenGate is a trademark of Oracle. Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company. Hortonworks, the Hortonworks logo and other Hortonworks trademarks are trademarks of Hortonworks Inc. in the United States and other countries. 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 is a registered trademark 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. NetVault is a trademark or registered trademark of Quest Software, Inc. in the United States and/or other countries. Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries. Oracle, Java, and Solaris are registered trademarks of Oracle and/or its affiliates. QLogic and SANbox are trademarks or registered trademarks of QLogic Corporation. Red Hat is a trademark of Red Hat, Inc., registered in the U.S. and other countries. Used under license. SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc. SPARC is a registered trademark of SPARC International, Inc. 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 registered trademark of Unicode, Inc. in the United States and other countries. 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 email: teradata-books@lists.teradata.com. 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 2000-2013 by Teradata Corporation. All Rights Reserved.

Preface Purpose This book provides information about Teradata SQL Assistant for Microsoft Windows which is a Teradata Tools and Utilities product. Teradata Tools and Utilities is a group of products designed to work with the Teradata Database or other database. Teradata SQL Assistant is a Windows-based information discovery tool designed to retrieve, manipulate, and store data from ODBC-compliant database servers. Audience This book is intended for use by: SQL proficient users who know how to formulate queries for processing on the Teradata Database or other ODBC-compliant systems Relational Database developers Supported Releases This book supports the following releases: Teradata Database 14.10 Teradata Tools and Utilities 14.10 Teradata SQL Assistant 14.10 Note: See To display information about SQL Assistant on page 36 to verify the Teradata SQL Assistant version number. To locate detailed supported release information: 1 Go to http://www.info.teradata.com/. 2 Under Online Publications, click General Search. 3 Type 3119 in the Publication Product ID box. 4 Under Sort By, select Date. 5 Click Search. 6 Open the version of the Teradata Tools and Utilities ##.##.## Supported Platforms and Product Versions spreadsheet associated with this release. Teradata SQL Assistant for Microsoft Windows User Guide 3

Preface Prerequisites The spreadsheet includes supported Teradata Database versions, platforms, and product release numbers. Prerequisites The following prerequisite knowledge is required for this product: Teradata SQL, or the SQL of another ODBC compliant database Relational Database Management Systems Microsoft Windows operating system ODBC connectivity software In addition, the following might be helpful to review prior to using Teradata SQL Assistant: This document... Windows Help file contains this information... Online help, accessible from the Teradata SQL Assistant main window by clicking on the toolbar. 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 Teradata Tools and Utilities Release Definition associated with this release. Table i: Changes to this Book Date August 2012 14.10 Description This release included the following changes: [Optional] Display Join Indexes and Triggers in the Database Explorer Tree. See Setting Database Tree Preferences on page 46. Specify whether a RowNumber column should be included when exporting data to a Microsoft Access table. See Exporting to Access - Formats and Data Types on page 126. Specify whether a Byte Order Mark should be written to unicode export files. See Setting Export Options on page 128. Specify whether a Byte Order Mark should be written to CLOB files. See Setting Data Format Options on page 117. Added support for the Teradata 14.10 XML data type. See Understanding Large Object Support on page 130. 4 Teradata SQL Assistant for Microsoft Windows User Guide

Preface Additional Information 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. Table ii: Additional Product Information Type of Information Description Source Release Overview Late Information Additional product information CD-ROM images Use the Release Definition for the following information: Overview of all of the products in the release Information received too late to be included in the manuals Operating systems and Teradata Database versions that are certified to work with each product Version numbers of each product and the documentation for each product Information about available training and the support center Use the Teradata Information Products web site to view or download specific manuals that supply related or additional information to this manual. Access a link to a downloadable CD-ROM image of all customer documentation for this release. Customers are authorized to create CD-ROMs for their use from this image. 1 Go to http://www.info.teradata.com/. 2 Under Online Publications, click General Search. 3 Type 2430 in the Publication Product ID box. 4 Click Search. 5 Select the appropriate Release Definition from the search results. 1 Go to http://www.info.teradata.com/. 2 Under the Online Publications subcategory, Browse by Category, click Data Warehousing. 3 Do one of the following: For a list of Teradata Tools and Utilities documents, click Teradata Tools and Utilities, then select an item under Releases or Products. Select a link to any of the data warehousing publications categories listed. Specific books related to Teradata SQL Assistant for Microsoft Windows User Guide are as follows: ODBC Driver for Teradata User Guide B035-2509 Teradata Query Scheduler User Guide B035-2497 Teradata Visual Explain User Guide B035-2504 1 Go to http://www.info.teradata.com/. 2 Under the Online Publications subcategory, Browse by Category, click Data Warehousing. 3 Click CD-ROM Images. 4 Follow the ordering instructions. Teradata SQL Assistant for Microsoft Windows User Guide 5

Preface Additional Information Table ii: Additional Product Information (continued) Type of Information Description Source Ordering information for manuals General information about Teradata Use the Teradata Information Products web site to order printed versions of manuals. The Teradata home page provides links to numerous sources of information about Teradata. Links include: Executive reports, case studies of customer experiences with Teradata, and thought leadership Technical information, solutions, and expert advice Press releases, mentions and media resources 1 Go to http://www.info.teradata.com/. 2 Under Print & CD Publications, click How to Order. 3 Follow the ordering instructions. 1 Go to Teradata.com. 2 Select a link. 6 Teradata SQL Assistant for Microsoft Windows User Guide

Table of Contents Preface.....................................................................3 Purpose.......................................................................3 Audience......................................................................3 Supported Releases..............................................................3 Prerequisites...................................................................4 Changes to this Book............................................................4 Additional Information..........................................................5 Chapter 1: Getting Started........................................................ 19 Introduction................................................................. 19 What is Teradata SQL Assistant?............................................. 19 How Teradata SQL Assistant Works.......................................... 20 Teradata SQL Assistant Features............................................. 20 Defining a Data Source......................................................... 20 Defining an ODBC Data Source.............................................. 21 Defining a.net Data Provider for Teradata Data Source......................... 23 Defining a.net Data Provider for Oracle Data Source........................... 26 Starting Teradata SQL Assistant................................................. 28 Connecting to and Disconnecting from a Data Source............................... 28 Connecting to an ODBC Data Source......................................... 29 Connecting to.net for Teradata............................................. 30 Connecting to.net for Oracle............................................... 31 Connecting to Multiple Data Sources......................................... 31 Re-Connecting to a Data Source............................................. 32 Displaying a Color Bar in the Query Window.................................. 32 Changing the Database Password............................................. 32 Main Window................................................................ 33 Menu Bar................................................................ 33 Hiding Toolbars........................................................... 33 Using the Status Bar........................................................ 33 Tabbing Windows......................................................... 34 Cascading Windows........................................................ 35 Teradata SQL Assistant for Microsoft Windows User Guide 7

Table of Contents Tiling Windows............................................................35 Arranging Windows.........................................................35 Changing the text size in a child window.......................................35 Using Online Help..........................................................36 Using Shortcut Menus and Commands.........................................36 Database Explorer Tree.........................................................36 Viewing Object Types.......................................................37 Opening and Closing the Database Explorer Tree................................38 Navigating to the Database Explorer Tree.......................................38 Changing the Width of the Tree Area..........................................38 Moving the Explorer Tree Window............................................38 Dragging Object Names to the Query Pane......................................39 Dragging Multiple Objects...................................................39 Using Quick Paste..........................................................39 Adding Double Quotes around Object Name....................................40 Adding Object Types........................................................40 Displaying Object Definitions.................................................40 Displaying Data Source Information...........................................41 Generating SQL for use with an Object.........................................41 Editing Table Data..........................................................42 Working with the Edit Table Dialog Box........................................43 Adding Databases...........................................................44 Removing Databases........................................................44 Refreshing the Database Explorer Tree.........................................45 Displaying the Shortcut Menu................................................45 Setting Database Tree Preferences.............................................46 Favorites and Examples Pane.....................................................48 Opening and Closing the Favorites Pane........................................49 Navigating to the Favorites Pane..............................................49 Changing the Width of the Favorites Pane......................................49 Moving the Favorites Pane Window...........................................49 Listing All Tables or Views In a Database...........................................50 Listing All Columns In a Table or View............................................50 Setting General Program Preferences..............................................51 Setting Default File Paths....................................................52 Using Page Setup...........................................................54 Using Print Preview.........................................................55 Support for Unicode and UTF-8.................................................55 Displaying Unicode Data...................................................55 Exporting Unicode Data....................................................55 Importing Unicode Data....................................................56 Support for the Visually Impaired.................................................56 8 Teradata SQL Assistant for Microsoft Windows User Guide

Table of Contents Text Size................................................................. 56 Color scheme............................................................. 56 Audible support........................................................... 56 Limitations................................................................... 57 Teradata.NET Specific Limitations........................................... 57 Oracle.NET Specific Limitations............................................. 57 ODBC Specific Limitations.................................................. 57 Chapter 2: The Query Window.................................................... 59 Introduction to the Query Window.............................................. 59 Using the Query Window....................................................... 60 Using SQL, DDL, and DML Statements....................................... 60 Displaying the Query Window Toolbar........................................ 60 Allowing Multiple Queries.................................................. 61 Splitting the Query Window into Two Windows................................ 61 Selecting Text and Inserting Bookmarks Using the Query Window Margin.......... 61 Creating Statements (Single and Multi)........................................ 61 Parameterized Queries...................................................... 62 Magnifying the Query Window.............................................. 62 Setting Query Options...................................................... 63 Setting Code Editor Options................................................. 65 Entering and Executing Queries................................................. 67 Entering a Query.......................................................... 67 Using Conditional Logic in a Query........................................... 68 Using Code Completion.................................................... 69 Customizing Code Completion Lists.......................................... 70 Executing a Query......................................................... 71 Using Transactions........................................................ 71 Running Multiple Queries.................................................. 72 Executing Multiple Statements in Parallel...................................... 72 Submitting Part of a Query.................................................. 73 Aborting a Query in Progress................................................ 73 Executing a Query Saved To a File............................................ 74 Automatically Minimizing the Teradata SQL Assistant Window................... 74 Renaming a Query Tab..................................................... 74 Deleting a Query Tab....................................................... 74 Working With SQL Text in the Query Window.................................... 75 Copying SQL from Previous History Record to the Query Window................ 75 Copying SQL from Next History Record to the Query Window................... 76 Teradata SQL Assistant for Microsoft Windows User Guide 9

Table of Contents Preventing Queries from Being Saved in the History Window......................76 Undoing or Redoing Query Window Changes...................................76 Setting Repeat Count........................................................76 Recording and Executing Query Window Macros................................77 Saving a Query.............................................................78 Performing a Quick Save.....................................................78 Adding a Query to Favorites..................................................78 Opening a Query from a File.................................................79 Copying a Query to Notepad.................................................79 Printing a Query............................................................80 Adding Comments to Queries................................................80 Highlighting a block of Text..................................................81 Showing Whitespace........................................................81 Converting Tabs to Spaces...................................................81 Indenting Lines in a Query...................................................81 Using the Right-to-Left Editor for Queries......................................82 Deleting Blank Lines from a Query............................................82 Finding a Text String in the Query Window.....................................82 Replacing a Text String in the Query Window...................................83 Displaying an Explain Plan of a Query.............................................83 Displaying a Visual EXPLAIN Plan............................................84 Displaying a Textual EXPLAIN Plan...........................................84 Query Builder Overview.........................................................85 SQL Statements............................................................85 Procedure Builder..........................................................86 <User Defined>............................................................86 Using Query Builder........................................................86 Supported Databases for Query Builder........................................87 Creating Custom SQL Sets...................................................88 Scheduling Queries for Later Execution............................................89 Before Scheduling Queries...................................................89 Scheduling Queries for Later Execution........................................90 Formatting a Query............................................................90 Indentation................................................................90 Language Definition Files....................................................91 Importing Data................................................................92 Before You Begin...........................................................92 Importing Data from a File...................................................93 Exiting from Import Mode...................................................93 Types of Import Operations..................................................93 Import Rules...............................................................95 Defining the Null Value for an Import Operation................................96 10 Teradata SQL Assistant for Microsoft Windows User Guide

Table of Contents Generating Multiple Reports From a Single Query.............................. 96 Using the Query Window Shortcut Menu......................................... 97 Displaying the Shortcut Menu............................................... 97 Functions in the Query Window............................................. 98 Chapter 3: The Answerset Window............................................. 101 Introduction to the Answerset Window.......................................... 101 Using the Answerset Window.................................................. 102 Viewing Your Results...................................................... 103 Adjusting Row Height..................................................... 103 Adjusting Column Width.................................................. 103 Re-arranging Column Order............................................... 103 Keeping Selected Columns From Scrolling Out of View......................... 104 Viewing Long Strings of Text Within Cells.................................... 104 Closing Answerset Windows Before Submitting a New Query.................... 104 Selecting All Answerset Rows............................................... 105 Merging Cells in the Answerset............................................. 105 Displaying the SQL That Generated an Answerset.............................. 105 Hiding Columns/Showing All Columns...................................... 106 Closing All Answersets..................................................... 106 Hiding Column Headers................................................... 106 Hiding Row Headers...................................................... 106 Displaying Totals for Numeric Columns...................................... 107 Displaying Aggregate Values................................................ 107 Finding a Text String in the Results Grid...................................... 107 Naming an Answerset Window............................................. 109 Naming an Answerset Tab................................................. 109 Deleting an Answerset Tab................................................. 109 Opening a Saved Answerset................................................ 109 Saving an Answerset to a File............................................... 110 Saving as XML........................................................... 111 Copying an Answerset to Notepad........................................... 112 Printing an Answerset..................................................... 112 Using Print Preview....................................................... 112 Cancelling Print Jobs...................................................... 113 Sorting an Answerset...................................................... 113 Filtering the Answerset.................................................... 114 Grouping the Answerset................................................... 114 Setting Answerset Options................................................. 115 Teradata SQL Assistant for Microsoft Windows User Guide 11

Table of Contents Setting Data Format Options................................................117 Changing the Font for the Entire Window.....................................120 Zooming the Answerset Window.............................................120 Charting Answerset data.......................................................120 Working with Charts.......................................................122 Formatting an Answerset.......................................................122 Formatting a Block of Cells..................................................123 Formatting a Single Cell....................................................123 Formatting a Single Row or Column..........................................123 Formatting Multiple Rows or Columns........................................123 Formatting the Entire Spreadsheet............................................124 Displaying Commas to Mark Thousand Separators..............................124 Displaying Numbers in Scientific Notation.....................................124 Displaying Decimal Places...................................................124 Exporting a Resultset..........................................................125 Exporting Results..........................................................125 Single-Clicking to Display the Export File......................................126 Saving Multiple Answersets.................................................126 Exporting to Access - Formats and Data Types..................................126 Setting Export/Import Options..............................................127 Setting Export Options.....................................................128 Setting Import Options.....................................................129 Understanding Large Object Support.............................................130 Using Answerset Shortcut Menus................................................131 Chapter 4: The History Window..................................................135 Introduction to the History Window.............................................135 The Columns of the History Window.........................................136 Using the History Window.....................................................137 Opening the History Window...............................................137 Closing the History Window................................................137 Viewing the Result Message.................................................137 Viewing DBS Error Messages................................................138 Viewing the History Rows...................................................138 Rearranging History Columns...............................................138 Filtering the History Rows..................................................138 Copying SQL from Previous History Record to the Query Window................140 Copying SQL from Next History Record to the Query Window...................140 Selecting All History Rows..................................................141 12 Teradata SQL Assistant for Microsoft Windows User Guide

Table of Contents Sorting the History Records................................................ 141 Finding a Text String in the History Table.................................... 142 Cleaning up the History table............................................... 143 Magnifying the History Window............................................ 144 Setting History Window Options............................................ 145 Editing History Records....................................................... 146 Displaying and Navigating the Edit History Dialog Box......................... 147 Editing a History Record................................................... 147 Compacting History...................................................... 147 Adding or Change a Note in a History Record................................. 147 Saving, Copying, and Printing History........................................... 148 Saving History Rows...................................................... 148 Copying Rows to the Clipboard............................................. 150 Copying Rows to Notepad................................................. 150 Printing the Contents of the History Window................................. 150 Cancelling Print Jobs...................................................... 151 Storing History Files.......................................................... 151 Changing the Location of History Files....................................... 151 The History Window Shortcut Menu............................................ 152 Appendix A: Startup Parameters and Default Preferences.................. 155 Startup Parameters........................................................... 155 Default Preferences (Options).................................................. 156 Miscellaneous and General Default Preference Settings.......................... 157 Query Default Preference Settings........................................... 159 Code Editor Tab Default Preference Settings.................................. 159 Data Format Tab Default Preference Settings.................................. 161 Answerset Tab Default Preference Settings.................................... 161 Export/Import Tab Default Preference Settings................................ 162 History Tab Default Preferences and Descriptions.............................. 162 Database Tree Default Preferences and Descriptions............................ 163 File Paths Tab Default Preference Settings.................................... 163 Page Setup Default Preferences and Settings................................... 163 Appendix B: Menus, Toolbars and Shortcuts................................... 165 Using Toolbars and Buttons................................................... 165 Teradata SQL Assistant for Microsoft Windows User Guide 13

Table of Contents The Main Toolbar.........................................................165 The Answerset Toolbar.....................................................165 The Query Toolbar........................................................166 Toolbar Button Descriptions................................................166 Customizing Menus and Toolbars...............................................172 Adding a Command to a Menu or Toolbar.....................................172 Menu Commands Only.....................................................173 Removing a Command from a Menu or Toolbar................................173 Moving a Command.......................................................174 Adding or Removing a Break Between Commands..............................174 Changing the Name for a Command..........................................174 Assigning or Changing a Keyboard Shortcut...................................174 Changing Menu Behavior...................................................175 Showing Recently Used Commands First......................................175 Resetting the Default Menu Bar..............................................176 Hiding the Toolbars........................................................176 Showing or Hiding Toolbar Screen Tips.......................................176 Adding, Removing, Renaming, or Resetting a Toolbar...........................176 General Command Shortcut Keys................................................177 Query Specific Shortcut Keys....................................................178 Window Control Shortcut Keys.................................................181 Answer / History Specific Shortcut Keys..........................................182 Appendix C: Configuration Files....................................................183 UserOptions.config............................................................183 Toolbars.config...............................................................184 DataSources.config............................................................184 DockMgr.config..............................................................184 Vendors.config...............................................................184 Glossary.................................................................187 Index.....................................................................193 14 Teradata SQL Assistant for Microsoft Windows User Guide

List of Figures Figure 1: The Default Main Toolbar............................................. 165 Figure 2: The Default Answerset Toolbar......................................... 166 Figure 3: The Default Query Toolbar............................................ 166 Teradata SQL Assistant for Microsoft Windows User Guide 15

List of Figures 16 Teradata SQL Assistant for Microsoft Windows User Guide

List of Tables Table 1: ODBC Data Source Types............................................... 21 Table 2: ODBC Driver Setup for Teradata Database Dialog Box: Field Descriptions...... 22 Table 3: Description of the Teradata.NET Connection Dialog Box..................... 25 Table 4: Description of the Oracle.NET Connection Dialog Box....................... 27 Table 5: Sub Folders Created When Objects Are Added.............................. 40 Table 6: Generate SQL Sub Menus............................................... 41 Table 7: Explorer Tree Shortcut Menu Commands.................................. 45 Table 8: Options Dialog Box, DB Tree Tab........................................ 47 Table 9: Options Dialog Box, GeneralTab......................................... 52 Table 10: Description of the File Paths Options..................................... 53 Table 11: Description of the Page Setup Dialog Box and Print Preview Window......... 54 Table 1: The Query Tab in the Options Dialog Box.................................. 64 Table 2: Code Editor Tab in the Options Dialog Box................................ 66 Table 3: Query Builder Statements............................................... 87 Table 4: Query Builder Icon Descriptions and Right-Click Options.................... 88 Table 5: The Query Window Shortcut Menu Commands and Descriptions............. 97 Table 6: Clipboard Support - Edit Commands..................................... 98 Table 1: Find Dialog Box...................................................... 108 Table 2: Answerset File Format Types............................................ 110 Table 3: Answerset Tab in the Options Dialog Box................................. 116 Table 4: Data Format Tab in the Options Dialog Box............................... 118 Table 5: Chart Definition Dialog Box............................................ 121 Table 6: Chart Menus and Shortcut Keys......................................... 122 Table 7: How SQL Assistant Maps Teradata Data Types to Access Data Types.......... 126 Table 8: Import/Export Tab in the Options Dialog Box............................. 127 Table 9: Export Tab in the Options Dialog Box.................................... 128 Table 10: Import Tab in the Options Dialog Box.................................. 129 Table 11: The Answerset Window Shortcut Menu Commands and Descriptions........ 131 Table 1: The History Window Column Descriptions............................... 136 Table 2: Description of History Window Filter Options............................. 139 Table 3: Find Dialog Box...................................................... 142 Table 4: Description of Cleanup History Options.................................. 144 Teradata SQL Assistant for Microsoft Windows User Guide 17

List of Tables Table 5: History Tab in the Options Dialog Box....................................145 Table 6: History File Format Types...............................................149 Table 7: The History Window Shortcut Menu Commands and Descriptions............153 Table 8: Startup Parameters.....................................................155 Table 9: Miscellaneous and General Default Preferences and Descriptions..............157 Table 10: Query Default Preferences and Descriptions...............................159 Table 11: Code Editor Tab Default Preferences and Descriptions......................159 Table 12: Data Format Tab Default Preferences and Descriptions.....................161 Table 13: Answerset Tab Default Preferences and Descriptions........................161 Table 14: Export/Import Tab Default Preferences and Descriptions....................162 Table 15: History Tab Default Preferences and Descriptions..........................162 Table 16: Database Tree Default Preferences and Descriptions........................163 Table 17: File Paths Tab Default Preferences.......................................163 Table 18: Page Setup Defaults and Descriptions....................................163 Table 1: Toolbar Button Descriptions.............................................166 Table 2: Adding, Deleting, Renaming and Resetting a Toolbar........................176 Table 3: Shortcut Keys.........................................................177 Table 4: Query Specific Shortcut Keys............................................178 Table 5: Window Control Shortcut Keys..........................................181 Table 6: Answer / History specific Shortcut Keys...................................182 Table 1: Properties Described by the Vendors.config File.............................184 18 Teradata SQL Assistant for Microsoft Windows User Guide

CHAPTER 1 Getting Started The topics in this chapter provide the basic information required to get started using Teradata SQL Assistant: Introduction Defining a Data Source Starting Teradata SQL Assistant Connecting to and Disconnecting from a Data Source Main Window Database Explorer Tree Favorites and Examples Pane Listing All Tables or Views In a Database Listing All Columns In a Table or View Setting General Program Preferences Support for Unicode and UTF-8 Support for the Visually Impaired Limitations Note: This document uses the term database as the term for table qualifier (the object that contains data tables). This term varies depending on the database vendor, and might be referred to as owner, schema or catalog in the vendor s own documentation. Introduction This topic provides basic information about Teradata SQL Assistant and a brief overview of its features. What is Teradata SQL Assistant? How Teradata SQL Assistant Works Teradata SQL Assistant Features What is Teradata SQL Assistant? Teradata SQL Assistant is an information discovery tool designed for Windows XP and Windows 7. Teradata SQL Assistant retrieves data from any ODBC-compliant database server. The data can then be manipulated and stored on a desktop PC. Teradata SQL Assistant for Microsoft Windows User Guide 19

Chapter 1: Getting Started Defining a Data Source How Teradata SQL Assistant Works Teradata SQL Assistant combines the data retrieved from ODBC databases with desktop applications such as Excel to create consolidated reports or to analyze the merged data. Teradata SQL Assistant records all SQL activity, complete with source identification, timings, row counts and notes. This is especially useful in data mining because the historical record can be used to build scripts from the SQL that produced positive results. Teradata SQL Assistant Features Teradata SQL Assistant provides several key functions: Creates reports from Teradata or any Relational Database that provides an ODBC interface. Exports data from the database to a file on a PC Imports data from a PC file directly to the database Uses an import file to create many similar reports (query results or Answersets). For example, display the DDL (SQL) that was used to create a list of tables. For more information, see Generating Multiple Reports From a Single Query on page 96. Sends queries to any supported database or send the same query to many different databases Creates a historical record of the submitted SQL with timings and status information such as success or failure Uses SQL syntax examples to tailor statements Uses the Database Explorer Tree to easily view database objects Uses a procedure builder that provides a list of valid statements for building the logic of a stored procedure Limits data returned to prevent runaway queries Defining a Data Source When connecting to a database, select either ODBC, the.net Data Provider for Teradata, or the.net Data Provider for Oracle. Connection to any other database must be made through an ODBC connection. In order to use the ODBC connection, a vendor specific ODBC driver must be installed. In order to use a.net Data Provider, that provider must be downloaded and installed. See also the following sections: Defining an ODBC Data Source Defining a.net Data Provider for Teradata Data Source Defining a.net Data Provider for Oracle Data Source Note: The.NET providers only appear in the dropdown list if they have been installed on the client system. 20 Teradata SQL Assistant for Microsoft Windows User Guide

Chapter 1: Getting Started Defining a Data Source Defining an ODBC Data Source An ODBC-based application like Teradata SQL Assistant accesses the data in a database through an ODBC data source. After installing Teradata SQL Assistant on a workstation, start Teradata SQL Assistant. Then define a data source for each database. The Microsoft ODBC Data Source Administrator maintains ODBC data sources and drivers and can be used to add, modify, or remove ODBC drivers and configure data sources. An About Box for each installed ODBC driver provides author, version number, module size, and release date. Use the Microsoft ODBC Data Source Administrator program installed on the workstation to define a data source in one of two ways. To define an ODBC data source 1 Do one of the following: From the Windows desktop, select Start > Control Panel > Administrative Tools > Data Sources (ODBC). From the Windows desktop, select Start > Programs > Teradata SQL Assistant 14.10 After Teradata SQL Assistant launches, select Tools > Define Data Source. 2 In the ODBC Data Source Administrator dialog box, decide what type of data source to create. Table 1 describes the data source types. Table 1: ODBC Data Source Types Data Source Description User DSN System DSN File DSN Explanation An ODBC user data source stores information about how to connect to the indicated data provider. An ODBC system data source stores information about how to connect to the indicated data provider. A system data source is visible to all users on this machine, including NT services. An ODBC file data source connects to a data provider. File DSNs can be shared by users who have the same drivers installed. Note: File DSN is not recommended. 3 After selecting the DSN type, click Add. For example, in the ODBC Data Source Administrator dialog box, click the System DSN tab to bring to the front. Click Add, then click OK. 4 In the Create New Data Source dialog box, select the appropriate driver and click Finish. For example, locate the Teradata driver under the column Name. Click to select the driver and click Finish. Teradata SQL Assistant for Microsoft Windows User Guide 21

Chapter 1: Getting Started Defining a Data Source 5 A dialog box appears for the selected database. This dialog box requests information that defines the location of the database and the connection parameters to be used when establishing a connection. The parameters vary from one vendor database to another. Table 2 describes the basic parameters used to connect to a database. Table 2: ODBC Driver Setup for Teradata Database Dialog Box: Field Descriptions Select This Field... Name Description Name(s) or IP address(es) Do not resolve alias name to IP address Use Integrated Security Mechanism Parameter Username Password To... Enter a name that identifies this data source. For example, in some cases there is more than one Teradata server to connect to or a user might have more than one logon depending on the function the user performs. Enter a description. This is solely a comment field to describe the data source name used. Enter the name(s) or IP address(es) of each LAN-connected node in the system, one per line. Entering only the first node name or IP address causes the client to communicate only with that node or IP address and can decrease system performance significantly. Define any names entered here in either Domain Name Services (DNS) or the local hosts file. The hosts file is located in the system32\drivers\etc subdirectory of the directory in which Windows is installed. Enter the name(s) or IP address(es) of the Teradata system. Note: Never enter both a name and an IP address. When this option is selected, setup routine does not attempt to resolve alias names entered into the Name(s) and IP address(es) box at setup time. Instead it is resolved at connect time. When cleared, the setup routine automatically appends COPn (where n = 1, 2, 3,..., 128) for each alias name entered. This causes other IP addresses associated with this server to be located, until a break in the sequence is detected. Select this option if logging on using integrated security measures. Leave this field blank to use the default mechanism. The authentication parameter is a password required for the selected mechanism. Enter a user name. Enter a password to be used for the connection if using Teradata SQL Assistant in an unattended (batch) mode. Entering a password here is not secure. 22 Teradata SQL Assistant for Microsoft Windows User Guide

Chapter 1: Getting Started Defining a Data Source Table 2: ODBC Driver Setup for Teradata Database Dialog Box: Field Descriptions (continued) Select This Field... Default Database (optional) Account String (optional) Session Character Set To... Enter the default database name. If the Default Database is not entered, the Username is used as the default. All tables, views, and macros are assumed to be in this default database unless explicitly prefixed by a database name in the query. Enter one of the accounts that the DBA assigned to the Username when it was created. Use the drop down menu to choose the character set. The default is ASCII. Teradata SQL Assistant is ready to use. For more information about using Microsoft ODBC Data Source Administrator, refer to the ODBC Data Source Administrator Help system. Note: The SQL Assistant option Allow use of ODBC SQL Extensions in queries no longer exists. Clear the ODBC DSN option Disable Parsing to allow the use of ODBC SQL Extensions in queries. ODBC Driver Before using Teradata SQL Assistant to access the data in the database, first install an ODBC driver on the PC. Each database requires a driver that is designed specifically for that database system. Obtain the appropriate driver from an database vendor or from a third-party supplier. Compatibility Teradata SQL Assistant is certified to run with any Level 2 compliant 32-bit ODBC driver. The product also works with Level 1 compliant drivers, but might not provide full functionality. Consult the ODBC driver documentation to determine the driver s conformance level. Most commercially available ODBC drivers conform to Level 2. Defining a.net Data Provider for Teradata Data Source Use the Connection Information dialog box to create, edit, and delete data sources for.net Data Provider for Teradata. The dialog box is also used to connect to existing Teradata.Net data sources. Data source definitions are saved to a file named DataSources.config. This file is located in \Users\<username>\AppData\Teradata\SQL Assistant on Windows 7 or \Documents and Settings\<username>\Application Data\Teradata\SQL Assistant otherwise. Additionally, system level data sources can be defined. These are stored in a file of the same name, located in \Users\All Users\AppData\Teradata\SQL Assistant on Windows 7 or \Documents and Settings\All Users\Application Data\Teradata\SQL Assistant otherwise. When a System level data source is selected, a padlock icon appears to the right of the data source name. For a Windows user with Standard rights, many of the properties within such a Teradata SQL Assistant for Microsoft Windows User Guide 23