in reply to Extracting data from an Ms ACCESS query
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 @$_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Extracting data from an Ms ACCESS query
by blackadder (Hermit) on Jun 11, 2004 at 11:58 UTC | |
by Joost (Canon) on Jun 11, 2004 at 12:00 UTC | |
by blackadder (Hermit) on Jun 11, 2004 at 12:16 UTC | |
by maa (Pilgrim) on Jun 11, 2004 at 12:45 UTC | |
by blackadder (Hermit) on Jun 11, 2004 at 13:56 UTC | |
by iburrell (Chaplain) on Jun 11, 2004 at 15:57 UTC | |
by periapt (Hermit) on Jun 11, 2004 at 19:09 UTC |