This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes UNION for Columns of CLOB data type does not work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "UNION for Columns of CLOB data type does not work" Watch "UNION for Columns of CLOB data type does not work" New topic
Author

UNION for Columns of CLOB data type does not work

Monoranjan Gorai
Greenhorn

Joined: Jul 25, 2005
Posts: 19
Hi,
I have two tables Encounter & Encounter_History. They have same columns. One column is of type CLOB. My requirement is to retrieve all the distinct records from both the tables with order by a date column. But problem is, UNION does not work in case of CLOB data type.

I know it will work if I use UNION ALL, but it returns duplicate records.

Please give me suggestion, how to solve this problem.

For example: The following query does not work since column1 is a CLOB data type

select column1 from table1
union
select column1 from table2

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UNION for Columns of CLOB data type does not work
 
Similar Threads
Question on update CLOB column when the column value is null
Out of Memory error
distinct column records
SQL Server Exception
Reading data from multiple tables. Any better way than this?