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

Building a query builder

Query builder is your quick reference guide to SQL syntax. It not only lets you use its own SQLs, but also provides you with the option to add your own along with editing the existing ones.

How to do it...

Query builder is available both in SQLA and Teradata Studio Express. Express query builder is more interactive and has drag-and-drop features. Let's first cover SQLA, followed by Studio Express.

Query builder in SQLA

Here is how you can proceed with query builder in SQLA:

  1. Query builder in SQLA is under the Help tab, or you can press F2. Here, you can click on any existing command or browse for the one you need. 
  2. You can also add frequently used queries in query builder. Click on + as shown in the following screenshot and add the queries that you need most, so that you don't have to search for them: 

Query builder in Express

Here is how to proceed with query builder in Express:

  1. In express, you can edit an existing query using the query builder. Selecting the query in the SQL Editor, right-click and select the Edit in Query Builder option:
    .
  2. Once you click on the Edit option, your query will be opened in a new window with many other options. Here, you can add new tables to the existing query, creating a relationship between them. There is also a tab that gives you options to put conditions (where, or, and) in queries. You can also add the group by clause; refer to the screenshot for details:

There is an option to change the statement type when you click on the statement box.

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