Author |
Message
|
MAN1SH |
Posted: Fri Jul 22, 2011 10:07 pm Post subject: Compressing the data |
|
|
Newbie
Joined: 03 May 2011 Posts: 8
|
Hi,
I have to extract the data from the tables and store in into a variable like
SET myVar=SELECT R FROM TABLE AS R;
but the maximum length of the myVar can be 255.
How to compress myVar if the result of the SELECT query exceeds 255 |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jul 23, 2011 3:02 am Post subject: Re: Compressing the data |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
MAN1SH wrote: |
Hi,
I have to extract the data from the tables and store in into a variable like
SET myVar=SELECT R FROM TABLE AS R;
but the maximum length of the myVar can be 255.
How to compress myVar if the result of the SELECT query exceeds 255 |
How about a specific select that only includes the field names you need?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Sat Jul 23, 2011 12:52 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
the maximum length of the myVar can be 255 |
Why? ESQL can represent strings with length > 255. Is this a requirement of the output message format?
Quote: |
How to compress myVar if the result of the SELECT query exceeds 255 |
What do you mean by 'compress'? If you are sending this data to another application, will that application understand your 'compressed' string? |
|
Back to top |
|
 |
MAN1SH |
Posted: Sat Jul 23, 2011 10:07 pm Post subject: |
|
|
Newbie
Joined: 03 May 2011 Posts: 8
|
Thanks for your response
Yes it is the requirement for the output Message
and the target side will understand the compressed string as they have only told to do so |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jul 25, 2011 12:29 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You did not answer my question. What do you mean by 'compress'? |
|
Back to top |
|
 |
MAN1SH |
Posted: Wed Jul 27, 2011 1:37 am Post subject: |
|
|
Newbie
Joined: 03 May 2011 Posts: 8
|
I want myVar to be of max length 255 |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jul 27, 2011 3:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
MAN1SH wrote: |
I want myVar to be of max length 255 |
That still doesn't answer what you mean by "compress". If you want myVar to be no more than 255 bytes you can truncate it at byte 256, but that's not compression. If you really are "compressing" the data, you're removing selected data and replacing it with a shorter, tokenised form (or removing it completely if it's lossy compression).
So the question stands - what do you mean by compression? Also what kind of ratio do you need? If 255 is the size of the target, what's the size of the original? 512? 1024? 4096? 3Gb?
Also how you do plan to use the data? What's uncompressing it? WMB? Target application? Monkeys with pencils and a hex calculator? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|