Name: iam2001 Date: July 11, 2007 at 12:57:46 Pacific Subject: Prob Assign Row count to a variable OS: Unix CPU/Ram: N/A Model/Manufacturer: N/A
Comment:
Is it possible to use a shell script to login to a database (using Teradata), run a query and assign the query result to a local variable defined in the shell? I know it's possible to run teradata SQL through a shell script if teradata is installed on the machine but what I want to do is to assign a value to a variable while at the SQL prompt.
Using command substituition, it's possible to assign the contents of any valid unix command - including shell scripts - to a shell variable. Using the Bourne shell, it's
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE