If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Error -881 - Desperate need of help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-29-03, 12:34
FatsGordon FatsGordon is offline
Registered User
 
Join Date: Dec 2003
Location: Buenos Aires - Argentina
Posts: 4
Error -881 - Desperate need of help

Hi,

I'm using Informix v7.3 and I've run into a problem that probably is a dumb one.

In a SP I declared a variable as reporte CHAR(6000). Then I performed a query, and concatenated the INTO variables with the reporte variable. But sometime after that, in the same SP I need to concatenate extra values to that variable. This happens several times throughout the whole SP.

One first attempt (and a dirty one) would be to DEFINE several variables, like var1, var2, ..., varn which would receive the contents of all the INTO variables. Since I know the data types of all INTO variables, I could DEFINE every varn to an especific size. Then, at the end, I would concatenate all into that reporte variable.

But as I said this is a dirty solution. So, in your opinion, is there a way to go "filling in the blanks"? I mean, is there a way to do a first assignment of data to the reporte variable, then calculate its lenght, then start filling with new data from (lenght + 1) position, calculate new lenght, etc.?

Thank you for your help! If you have extra questions please ask.

Last edited by FatsGordon; 12-29-03 at 14:35.
Reply With Quote
  #2 (permalink)  
Old 12-29-03, 19:39
FatsGordon FatsGordon is offline
Registered User
 
Join Date: Dec 2003
Location: Buenos Aires - Argentina
Posts: 4
Silly me...

I think I've solved it. The SUBSTR and the LENGTH functions did the trick. I know it was a dumb question, after all...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On