[thelist] Help with SQL query JOIN using ASP/VBScript [SOLVED]

Pringle, Ron RPringle at aurora-il.org
Fri Apr 14 09:46:01 CDT 2006


Tab wrote:
 
> The output you're after is often called a "Crosstab", and 
> can't be done with simple SQL joins.  With SQL Server you 
> could write a stored procedure to handle this, but since 
> you're using Access, I'd recommend you handle this in the 
> VBScript code.  You can either:
> 
> 1.  Get one big recordset, and as you iterate through it, 
> check to see if the event name has changed.  If it hasn't, 
> just print the date without printing the name of the event again.
> 
> 2.  Get a recordset of event titles, and as you iterate 
> through it, do another query on each of them to get the dates 
> for that event.
> 
> HTH.

Tab-

Thanks for the suggestions. I ended up going with a combination of the
two suggestions because I still needed the dates initially, as they
determine sort order.

Eventually I'll be moving all of this stuff to either MSSQL or MySQL and
PHP probably, and then I'll rewrite all of this stuff again. Yay. Its
local government, so things move slowly (still on Win2K here) and
budgets are razor thin.

Thanks again for pointing me in the right direction.

Ron


More information about the thelist mailing list