Domanda

I have tried to group the multiple rows into a single rows using WM_CONCAT function using Oracle 10g.

But when running my query, I am getting the following error:

ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at "WMSYS.WM_CONCAT_IMPL", line 30 06502. 00000 - "PL/SQL: numeric or value error%s

Output of my query is :

5319| 64764011907| 6893,1109,1120,1297,1327 (Need Comma separated list of store for a client id)

I will not be able to create the types- lack of previliges.

Please let me know if I can do the grouping using some different method in Oracle 10g.

È stato utile?

Soluzione

Tim Hall has a pretty canonical list of string aggregation techniques in Oracle. Unfortunately, I don't believe that any of them are going to work for you if the result needs to be able to exceed 4000 bytes and you cannot create any sort of object in the database and you're using 10.2. The sys_connect_by_path approach would be the only one worth testing but that's almost certainly limited to 4000 bytes as well.

If you have access to the various XML functions, you could potentially use the xmlagg function to produce a CLOB.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top