My Oracle Support Banner

How To Identify the Mismatching Column Datatypes If Query Hits Ora-1790 (Doc ID 372751.1)

Last updated on NOVEMBER 07, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 8.1.7.4 to 11.2.0.4 [Release 8.1.7 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 29-DEC-2016***

Purpose

This Article is intended to help DBAs identify the Mismatching datatype columns when a Complex queries connected by  UNION/UNION ALL hit ORA-01790

 

 

The ORA-01790 is defined as:

Error: ORA 1790
Text: expression must have same datatype as corresponding expression
-------------------------------------------------------------------------------
Cause: A SELECT list item corresponds to a SELECT list item with a different
datatype in another query of the same set expression.
Action: Check that all corresponding SELECT list items have the same datatypes.
Use the TO_NUMBER, TO_CHAR, and TO_DATE functions to do explicit data
conversions.

Troubleshooting Steps

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Purpose
Troubleshooting Steps

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.