I have a data set (currently in Access 2007 format) which has 2 tables, simplified to
category
categoryid | category name | first item 1 | category 1 | i1 2 | category 2 | i2 3 | category 3 | i3
items
itemid | item name | next item i1 | item 1 | i4 i2 | item 2 | i5 i3 | item 3 | i6
The category defines the first item and each subsequent item references the next item until an item’s next item is NULL, so it should be possible to find all the items for a particular category by continually following the next item field. Is this possible in SQL or do I need to drop out to a script to process it? I was hoping that there was at least a half-way house in that a SQL query could get me some of the way before using VBScript or similar.
I could import this to SQL server if that provides additional functionality not available in Access.
On SQL Server you can write such query using Common Table Expressions. See here: http://msdn.microsoft.com/en-us/library/ms186243.aspx
Not sure if it’s possible in Access, though.