In your query, first result set transfer date is to be used as char,
whereas in other it Id date.

Try putting second query on top and top one on down after removing to_char,
it may work.

Regards,
Jignesh
------------------------------
From: Jignesh Makwana
Sent: 18-02-2012 17:59
To: sudheer narra; oracle-plsql@googlegroups.com
Subject: RE: [PL/SQL] error mismatch datatype

The datatypes should match at column level in all result sets on which set
operators are applied


Regards,
Jignesh
------------------------------
From: sudheer narra
Sent: 18-02-2012 16:45
To: oracle-plsql@googlegroups.com
Subject: Re: [PL/SQL] error mismatch datatype

Hi as per my knowledge since ur doing union both d data types in both d
tables should b d same
If iam wrong plz correct me

Regards,
Sudheer
 On Feb 18, 2012 3:03 PM, "happytoday" <ehabaziz2...@gmail.com> wrote:

> I was running an example from some site and I completed the
> requirements of that example with the below error :
> select empno, ename, sal, to_char(null) as "Transfer Date" from emp
>
>  UNION
>
> select empno,ename,sal,tdate from emp6;
>
>
>
> select empno, ename, sal, to_char(null) as "Transfer Date" from emp
>                          *
>
> ERROR at line 1:
> ORA-01790: expression must have same datatype as corresponding
> expression
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Oracle PL/SQL" group.
> To post to this group, send email to Oracle-PLSQL@googlegroups.com
> To unsubscribe from this group, send email to
> oracle-plsql-unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/Oracle-PLSQL?hl=en
>
 --
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to