Archives of the TeradataForum
Message Posted: Wed, 10 Oct 2001 @ 07:55:14 GMT
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
|