some_file")." />
|
Archives of the TeradataForumMessage Posted: Mon, 10 Sep 2007 @ 12:21:22 GMT
Bteq (and most other unix tools) don't work that way. You have a couple of options that are all based upon the same concept. The option you choose will depend upon what value you are trying to get. 1. Capture the output. 2. Parse the output to extract the data you are looking for. If you are looking for something in the data returned by a query (e.g. a particular column in a particular row, you can export the result set to a file and parse that. Refer to the .export command. If you are looking for something from the bteq output - e.g. the number of rows, then you will need to redirect the output of the bteq command itself using the redirection operator (e.g. "bteq > some_file"). Once you've captured the output, you can use any number of Unix utilities to find the data you're looking for and do whatever you like with it. Perl is a great tool for this sort of thing. Another possibility if you are prepared to use perl is to run your query through DBI. You might find this approach to be far less tedious. I hope this helps Glenn Mc
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | |||||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | |||||||||||||||||||||||||||||||||||||||||||||||||||