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 -> Re: oracle 8.1 "expression must have same datatype as corresponding expression"

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

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 10 May 2006 07:09:16 +0200
Message-ID: <4461757a$0$30105$636a55ce@news.free.fr>

"tk72" <t_karlsson72_at_hotmail.com> a écrit dans le message de news: 1147222277.868852.218010_at_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
|

to_number(null)

Regards
Michel Cadot Received on Wed May 10 2006 - 00:09:16 CDT

Original text of this message

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