Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8842437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:57:30+00:00 2026-06-14T10:57:30+00:00

I am trying to create a table view by running the sql below SELECT

  • 0

I am trying to create a table view by running the sql below

  SELECT   IACM1.CMNT_REAS_TYP,
           TO_CLOB(LPAD (
                      LISTAGG (IACM1.CMNT_TXT, ' ')
                         WITHIN GROUP (ORDER BY IACM1.LN_NUM),
                      4000,
                      LISTAGG (IACM1.CMNT_TXT, ' ')
                         WITHIN GROUP (ORDER BY IACM1.LN_NUM)
                   ))
    FROM   FT_T_IACM IACM1, FT_T_IACM IACM2
   WHERE   IACM1.ISSACT_ID = IACM2.ISSACT_ID
           AND IACM1.CMNT_REAS_TYP = IACM2.CMNT_REAS_TYP
GROUP BY   IACM1.cmnt_reas_typ;

But I am getting the error below

ORA-01489: result of string concatenation is too long
01489. 00000 – “result of string concatenation is too long”
*Cause: String concatenation result is more than the maximum size.
*Action: Make sure that the result is less than the maximum size.

I looked up and I found suggestions to use to_clob but it is still throwing this error. I am using oracle 11g. Thanks for the help in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:57:31+00:00Added an answer on June 14, 2026 at 10:57 am

    The longest a concatenated string in a LISTAGG can be is 4000 characters. In this query, the sum of the lengths of CMNT_TXT for one or more CMNT_REAS_TYP values appears to be more than 4000. The LISTAGG builds the string before the LPAD truncs it to 4000 characters – so the LPAD has no effect in this case. Also, the TO_CLOB has no impact because the LISTAGG goes to a varchar2 before anything else happens.

    One way to fix this would be to put additional fields in your Group By if possible. If that’s not an option, you might try using COLLECT instead of LISTAGG – you’ll have more issues with getting datatypes to match up but it’s doable.

    Here’s a link with some comparisons between LISTAGG and COLLECT and a little bit on how to use COLLECT: http://www.oracle-developer.net/display.php?id=515

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create table from view from remote server (calling procedure UPDATE_PROC), like
I am trying to create a settings table view for my app. I am
I am trying to create a pivot table type view in postgresql and am
I am trying to create 3 table view cells using code (w/o nib). I
I am trying to create a table view similar to the YouTube video uploader
I am trying to decide whether to create a global view table or 1
I am trying to create a table view header with rounded corners but a
I'm trying to create a custom table view cell that has a button on
Whilst trying to create a view based table it keeps calling the objectValueForTableColumn function
I am trying to create a table view which uses two types of cells

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.