Re: Debit / Credit SQL Output - and a new puzzle
Posted in 1997
Richard Stanford — — source: Informix-list mailing list archive (1991-1998)
On 28 Jul 1997, Paul Roberts wrote: > OK, here's my 4GL reporting puzzle: how do I produce a report ordered > like this: > > ALABAMA LOUISIANA OHIO > ALASKA MAINE OKLAHOMA > ARIZONA MARYLAND OREGON [snip] > One way would be load up an array, but that would set a limit on the number > of elements we would handle (since the array has to be declared as of being > of some finite size). Is there a better way to do it? Absolutely. Throw the ordered data into a temp table with a serial key as well, then pick your midpoints (being (number of values) / (number of columns)) and do your selects "horizontally" by serial key. This has worked well for us in the past. -Richard