Re: Help required with SQL query
Posted in 1998
On Fri, 01 May 1998 18:21:15 +0100, Peter Lancashire <Peter.Lancashire.PL1@bayer.co.uk> wrote: [snip original query] >Two ideas spring to mind: > >1. Create a table which encodes the rows the way you want them reported, >ie > >001 001 >002 002 >003 003 >004 OTHER >005 OTHER >006 OTHER > >Then join and group by that. > >Alternatively, you could do it manually in ACE with lots of local >variables. You're a bit vague about what you want to do with the data, >but assuming part of the problem is organising things in a row when they >arrive in the wrong order, the solution is a long string where you use >string[i,j] to pick out sections of it like an array. This is easier in >4GL, which has real arrays and allows non-SELECT SQL in reports. >-- [snip] Hi Peter, Sorry for the delay getting back to you. Many thanks for your response; I will be looking into it over the next day or so. Cheers, Ian.