1 Replies - 608 Views - Last Post: 17 May 2018 - 12:40 AM

#1 ikhlas06   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 333
  • Joined: 20-May 16

inconsistent datatypes: expected - got CLOB

Posted 16 May 2018 - 01:48 PM

Select  Sub1.data1, Sub1.data2, Sub1.data3, Sub2.data4
From myTable m 
left join 
        (
        SELECT  m.key, data1, data2, data3
        from myTable m
        left join newTable s on s.Key = m.Key
        where m.age = 85
        group by m.key
        )Sub1 on Sub1.Key = m.Key
left join 
        (
        SELECT  m.matter_key, 
        rtrim(
     replace(
            replace(xmlagg(
                           xmlelement("e", s.note) order by s.date desc).getClobVal(),
                     '</e>', '\n'), 
             '<e>', ''), 
      '\n') as data4
        from myTable m
        left join newTable s on s.Key = m.Key
        where m.age = 85
        group by m.key
        )sub2 on sub2.Key = m.Key
group by Sub1.data1, Sub1.data2, Sub1.data3, Sub2.data4


Error:
  [Error Code: 932, SQL State: 42000]  ORA-00932: inconsistent datatypes: expected - got CLOB



Error line#1:
Select   Sub1.data1, Sub1.data2, Sub1.data3, Sub2.data4


Is This A Good Question/Topic? 0
  • +

Replies To: inconsistent datatypes: expected - got CLOB

#2 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6819
  • View blog
  • Posts: 28,255
  • Joined: 12-December 12

Re: inconsistent datatypes: expected - got CLOB

Posted 17 May 2018 - 12:40 AM

What do you think the problem might be? What steps have you taken to debug your statement?

You have been here long enough to know that just posting some code and an error message is not well received.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1