Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> oracle 8.1 "expression must have same datatype as corresponding expression"

oracle 8.1 "expression must have same datatype as corresponding expression"

From: tk72 <t_karlsson72_at_hotmail.com>
Date: 9 May 2006 17:51:17 -0700
Message-ID: <1147222277.868852.218010@j33g2000cwa.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US