Re: [Rails] Trying to do a report with a list of zip codes and getting stuck..

2010-09-10 Thread Colin Law
On 10 September 2010 05:41, Bob Smith bsm...@gmail.com wrote: I'm trying to get a list of zip codes in my database with zipstring = sprintf(select distinct zip from visits,households where +  households.id=visits.household_id and visits.month='%2d' and visits.year = '%4d' +  and

Re: [Rails] Trying to do a report with a list of zip codes and getting stuck..

2010-09-10 Thread Philip Hallstrom
On 10 September 2010 05:41, Bob Smith bsm...@gmail.com wrote: I'm trying to get a list of zip codes in my database with zipstring = sprintf(select distinct zip from visits,households where + households.id=visits.household_id and visits.month='%2d' and visits.year = '%4d' + and

[Rails] Trying to do a report with a list of zip codes and getting stuck..

2010-09-09 Thread Bob Smith
I'm trying to get a list of zip codes in my database with zipstring = sprintf(select distinct zip from visits,households where + households.id=visits.household_id and visits.month='%2d' and visits.year = '%4d' + and visits.monthly = 1 order by households.zip;, datestart.month,