It seems to me that you have a flawed design.

You should just have a 2 column database to begin with, with a table like this:

  Code  Count
  a     4
  b     2
  c     3

Rather than plain inserting or deleting rows, just sometimes insert or delete, you should instead increment or decrement counts, adding a row if its the first instance of the code, and removing the row if it would decrement to zero.

Displaying sparse like that should be a function of your application display code, not the database, and it can easily do that using a simple for-loop or something for each fetched row, iterating on the count.

-- Darren Duncan

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to