| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Usenet -> c.d.o.server -> oracle 8.1 "expression must have same datatype as corresponding expression"
I have been developing for Oracle 9i a bit, and there I can do a select
like this:
SELECT F1, F2, NumField
FROM TBL1
UNION
SELECT F1, F2, NULL AS NumField
FROM TBL2
This query doesn't make much sense, but it illustrates my problem.  As
I said, it works in 9i, but in 8.1, I get the "expression must have
same datatype as corresponding expression" error.  NumField is a
numeric field, and it can be any number, so I can't just make up a
number for the field in the second part of the UNION.  In queries where
the "real" field is a string, the made up filed can be NULL.  I hope
this makes sense to someone.  Any idea how I can accomplish this in
Oracle 8i?
Thanks in advance,
TK Received on Tue May 09 2006 - 19:51:17 CDT
|  |  |