Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 08 Oct 2010 @ 07:18:16 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Sequencing SQL Queries?
 
From:   DWellman

Hi Fred,

Generating a single answer set for multiple UnitSerNum values can be done using an IN clause. Change the first line of your WHERE clause to:

     Where d.UnitSernum IN
     (186345,242424,834756387,387456837456,347895638476,....)

Everything else stays the same and the answer set will contain rows for multiple values.

You also talk about "separate output files". Are you meaning files on your client system (pc, linux box, mainframe etc) ? If you are then that needs to be done by a client program. A possible alternative is to use what's called an OUTMOD (or Access Module ?). This concept is supported by both Bteq and Fastexport and is code that you write and could be used to split the answer set into multiple data files. Although to be honest having a separate program to do this will be a lot simpler.

SQL always produces a single answer set to a single query.

If you want different files then you either run different queries or have some non-SQL processing to split the single answer set into multiple files.

Or of course I've completely missed the point...


Cheers,

Dave

Ward Analytics Ltd - Information in motion ( www.ward-analytics.com )



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023