Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 10 Oct 2001 @ 07:55:14 GMT


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


Subj:   Re: Query help needed
 
From:   David Wellman

"Mr Rommel" is correct, the problem lies with your use of double-quotes. Take them out.

But to get what you need, try the following;

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

To get a literal in your answer set surrounded by single-quotes, you need to use 4 single-quotes, concatenated with the literal (which itself must be surrounded by single-quotes because it's a literal) concatenated with another 4 single-quotes.


Dave



     
  <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