• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Size of string variable exceeding 32767

 
Gilbert johnson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys

I'm building a dynamic query in my PL/SQL stored procedure.
Like within a for loop, I keep concatinating the SQL statements into varchar2 variable:
example:



It works fine. But if there are more messages, the main_query grows large. The problem is the main_query is of type varchar2 and can only store upto 32767 chars.

Now since my query is being built dynamically - its size increases past 32767.

What options do I have. I've read about CLOB and BLOBS but they are tied with database columns. I dont know whether I can use them like standalone variables.

I tried doing something like this - but it did'nt work.


It comes back with Invalid LOB locator.

Any help would be appreciated.
Thanks
Gublooo
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic