Thanks for the tip. I am looking at just making 16 separate queries.
It will be easier to manage and faster to run.
Dan
On Sep 6, 2008, at 9:37 PM, Brent Baisley <[EMAIL PROTECTED]> wrote:
Well, for your simple example, you can use query variables to add
the "counters".
SET @cntr:=0, @last
Well, for your simple example, you can use query variables to add the
"counters".
SET @cntr:=0, @lastVal:='A'
INSERT INTO tableB LOC,DATA SELECT CONCAT(LOC,
CONCAT( IF(@lastVal=LOC, @cntr:[EMAIL PROTECTED], @cntr:=0),
IF(@lastVal:=LOC,'',''))) LOC, CONCAT(DATA, @cntr) FROM tableA ORDER
BY