Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Teradata Cookbook

You're reading from   Teradata Cookbook Over 85 recipes to implement efficient data warehousing solutions

Arrow left icon
Product type Paperback
Published in Feb 2018
Publisher Packt
ISBN-13 9781787280786
Length 454 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (3):
Arrow left icon
Abhinav Khandelwal Abhinav Khandelwal
Author Profile Icon Abhinav Khandelwal
Abhinav Khandelwal
Viswanath Kasi Viswanath Kasi
Author Profile Icon Viswanath Kasi
Viswanath Kasi
Rajsekhar Bhamidipati Rajsekhar Bhamidipati
Author Profile Icon Rajsekhar Bhamidipati
Rajsekhar Bhamidipati
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Installation 2. SQLs FREE CHAPTER 3. Advanced SQL with Backup and Restore 4. All about Indexes 5. Mixing Strategies – Joining of Tables 6. Building Loading Utility – Replication and Loading 7. Monitoring the better way 8. Collect Statistics the Better Way 9. Application and OPS DBA Insight 10. DBA Insight 11. Performance Tuning 12. Troubleshooting 13. Other Books You May Enjoy

Connecting to the Teradata system

Now, before starting up with our very first query, you need to know that express works in the ANSI TMODE. You need to change to TERA mode manually. 

Additionally, you can have a multiple connections to the same database connection or a different one.

TERADATA MODE is not Case sensitive, where as ANSI MODE is CASE sensitive. Also, in TERADATA MODE each transaction is committed implicitly and in ANSI MODE transaction has to be committed explicitly.

How to do it...

  1. Let's execute our very first query:
/*Sample query*/
sel * from dbc.dbcinfo;
  1. The output of the preceding query will give us the current version of the Teradata Database system. Yes, we are on 15.10.03.07:

This is a heavy tool, so it will consume more resources from your PC compared to the handy and breezy SQL Assistant. We'll be exploring SQL Assistant in the later part of this chapter.

There's more...

Humans and software—we judge them on the basis of their characteristics. Let's explore some of the important options available with Teradata Studio Express.

Using Studio tool options

Here are some of the tool options that we will cover:

  • SQL compare: Comparing two text documents is the basic necessity of the coding community. There are many tools for this job. However, when you have a built-in feature for it, you don't need to go anywhere else. You ask how to use it? Click on the Project Explorer tab (next to the Data Explorer tab). Right-click on the SQL tab and create SQL text files that you need to compare. Select both files and select the Compare With | Each Other option. The text that is different will be highlighted and shown:
Different text highlighted in the Text Compare  
  • Code assist and syntax checking: Forgot the names of the tables in the database, a column name, or the syntax of your statement? Express will prompt as you type. Type EXEC for macro execution with the code assist ON and you will get a series of options that will go with the main command. Now, when you write a database name followed by a dot, it will give you a list of tables to choose from that database:
  • Object Viewer: This works in a similar to the traditional tool SQL Assistant; however, it can help to get more details for your object of interest. If you have Studio, it will have even more options for admin use. Right-click on any object from the Explorer. You will see all the options affiliated with the object you need:
Options affiliated with the selected option

There are many other options at your disposal that you can explore.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image