Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 09 Oct 2001 @ 19:47:56 GMT

  <Prev Next>  
Next> Last>>  

Subj:   Query help needed
From:   John Smith

I have a query that I recently created for V2R4 that I just can't figure out. If anyone on the list is capable of helping thank you in advance.

Here is the problem:

You see, I need to do two different sums from two positively different tables. I want to display, or show, each sum in the output of my query. Ostensibly this could be done with "union".

The query is copied below.

Either I'm crazy or I'm not. Either way this query refuses to return a result: error 3810.

select "'Table A'",sum(product_cost)
from mytable
union all
select "'Table B'",sum(product_cost)
from mytable2;

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