Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query by location when locations change weekly? IDEAS PLEASE?

Status
Not open for further replies.

scottcsherman

Programmer
Oct 9, 2002
14
0
0
US
I have a table which has locations in it that change everyweek. I would like to write a query or function that would take all the locations and output them to a report or querie with each page being a seperate location. I thought about writing a qurey that would generate an seperate table for each location but this would generate about 30 extra tables each week.

Any advice or ideas would help

Thanks

Scott
 
Will there be the same number of locations every week? If so (and if I'm understanding this correctly), I would identify each location by number in a location reference table (with columns "location name", "location id") and then using that location id to identify the detail tables. The "location name" can change weekly, but the id's will stay the same. This would have to be fancier if you need to archive the information, though.
 
Extract the locations from the 'active data' with a select DISTINCT query on hte location field. Use this as an outter join with the query which returns the 'active data' Do the normal sort / group sttuuuffff in the report.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top