How To Start SQL Assistant Using Batch Mode or Using Command Prompt?
How To Start SQL Assistant Using Batch Mode or Using Command Prompt?
How To Start SQL Assistant Using Batch Mode or Using Command Prompt?
Command Prompt?
How to start SQL assistant using Batch Mode or using Command Prompt.
This is indeed interesting as there is not much documentation on how you can use SQL assistant via
Batch mode or using Command prompt in Windows.
For most of batch mode / Command prompt (interactive mode) we would use Bteq due to its flexibity and
ease of use in either Windows or UNIX systems.
There are some cases where you would like to use SQL assistant to run the set of queries over a period
of time or for repetitive tasks. In such cases we could use following commands.
Explanation
Sqla
-c Test1
Please make sure to setup ODBC connection string using ODBC administrator & enter IP address,
Username & password.
-f "c:\my queries\emplst.sql"
The parameter –f is used to open a file in the given path directly on to Sql assistant.
In above scenario, we are trying to open emplst.sql which is present in c:\my queries
As a general rule I would enclose filenames in double quotes just in case they contain spaces or special
characters.
-e "c:\my queries\emplst_output.log"
The parameter –e is used to export the results/ output into the given file.
I would suggest to use –p parameter whenever running the command as to identify the Data source as
either ODBC or Teradata.net
One could create a reusable batch file in windows and run this command with our sql file and record
output in log file for reporting or whatever you want to do!!!
Steps:
NOTE: There should be a '?' as a Place-Holder for all the columns in your Source File.
11. Turn off the Import Data mode and resume querying.
1. Make sure you have the columns in Excel in the same order as the table you created. Remove the
header rows from the Excel file and Save the file as comma delimited file from Excel (CSV File).
2. In SQL Assistant set the Delimiter as ","(comma) .
( Delimiter is available in Menu Tools , Options, Import/Export)
3. Go to "Tools=>Options" and select the Date Format as 'YYYY-MM-DD'.
P.S: This option is used when a date column exists in the table.
6. Highlight the insert query and Press F5. This will prompt you for a file location. Select the appropriate
file.
7. This will load in the order in which they appear in your text file, which is why it is important to match the
columns in Excel with the order of the columns in your table.
DEFINITION
Teradata SQL Assistant (TSA), as part of Teradata Tools and Utilities (TTU), is an ODBC-based client
utility used to access and manipulate data on ODBC-compliant database servers
Teradata SQL Assistant is an information discovery tool designed for Windows XP and Windows 2000.
Teradata SQL Assistant retrieves data from any ODBC-compliant database server. The data can then be
manipulated and stored on the desktop PC.
OVERVIEW
Teradata SQL Assistant for Microsoft Windows, originally called "Queryman" (before V. 6.0)or
"QueryMan" (V. 6.0 and up), is also known as "SQLA" among programmers. It supports import / export
tasks, but not the serious ones.
With its user-friendly GUI, TSA for Windows is generally oriented to business users and casual
data consumers. (Refer to BTEQ for comparison.) .
* Send queries to any ODBC database or the same query to many different databases;
* Export data from the database to a file on a PC;
* Create reports from any RDBMS that provides an ODBC interface;
* Import data from a PC file directly to the database;
* Use 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;
* Create a historical record of the submitted SQL with timings and status information such as success
or failure;
* Use SQL syntax examples to tailor statements;
* Use the Database Explorer Tree to easily view database objects;
* Use a procedure builder that provides a list of valid statements for building the logic of a stored
procedure;
* Limit data returned to prevent runaway queries.