I'd make several tables for business_unit, group, subgroup and application, referering to each other where appropriate. and a cross table between subgroup and application.
Then do something like:
With the current model it would look like:my $result = $dbh->selectall_arrayref( "SELECT application.name FROM application, group, subgroup, app_sub +group WHERE application.id = app_subgroup.application AND app_subgroup.subgroup = subgroup.id AND subgroup.group = group.id AND group.name='Procurement'" ); foreach (@$result) { print @$_; }
Which is simpler, but will get you in trouble later on when your table starts getting bigger and bigger and people start spelling Internet Explorer as "Internt Explorer".my $result = $dbh->selectall_arrayref( "SELECT DISTINCT(application) FROM table_name WHERE group_name='Procurement'" ); foreach (@$result) { print @$_; }
In reply to Re: Extracting data from an Ms ACCESS query
by Joost
in thread Extracting data from an Ms ACCESS query
by blackadder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |