flakpit wrote:
> 
> There may be thousands of category and subcategory duplications as they are
> not the primary record identifier.
> 
> I.e. A record has a category of "Manuals" and a subcategory "Audio"
>       Another record has a category of "Manuals" and a subcategory "Phone"
>       A record has a category of "Receipts" and a subcategory "Water"
>       A record has a category of "Receipts" and a subcategory "Gas"
>       A record has a category of "Receipts" and a subcategory "Electricityr"
> 
> So they would look like:
> 
> Manuals
>   + Audio
>   + Phone
> Receipts
>  + Water
>  + Gas
>  + Electricity
> 

You could try

   select distinct category, subcategory
   from documents
   order by category, subcategory;

Then your application can do the display formatting, such as suppressing 
the display of the category when it is the same as the last record.

HTH
Dennis Cote
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to