Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Union Query Long Datatypes and a "Placeholder" Corresponding Value
Oracle server 8.1.7.4.0
I'm dealing with an application over which I have no real control to be able to change table structure other than to add my own columns. I am trying to create a union query of the sort:
SELECT c1, c2 FROM ....
UNION ALL
SELECT c1, c2 FROM ....
When c2 data type is long in both tables I am fine. However, I have one case where c2 is a long data type in one table and there is nothing corresponding in the second table (it does not have a long datatype column). Is there a way to handle this?
I've tried:
SELECT c1, c2 FROM ....
UNION ALL
SELECT c1, '' c2 FROM ....
in an attempt to have '' stand in for the long data type, ie, what I call a "Placeholder" corresponding value in my title. This results in ora 01790 expression must have same datatype as corresponding expression.
Is there a way to handle this? I could add a "dummy" long into the second table, but this would be a last resort.
Thanks in advance.
-- Tim http://www.ucs.mun.ca/~tmarshal/ ^o< /#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake /^^ "What's UP, Dittoooooo?" - DittoReceived on Sun Jan 22 2006 - 22:43:49 CST
![]() |
![]() |