Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Crosstab query in ASP with VBScript

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-01-24 : 08:53:34
Jay writes "I am trying to do a crosstab query in ASP utilizing VB Script. The data that I have needs to be crosstabulated between a group of zip codes and the date. Then I need the number of items sent to each of these codes on each day.

I have been able to do this utilizing do while statments and nesting SQL queries inside, but it is banging the daylights out of my server. Currently some of the pages are running over 6000 queries to complete. It also takes about 2 minutes to display a page.

I've tried to work with the TRANSFORM and PIVOT keywords that Access utilizes but am unable to figure out how to display the information returned. I have also tried working with the CASE statments but as the dates change for each job and will continue to change into the future, I haven't been able to figure out how to use CASE and display the results.

If anyone can help with displaying the data in a crosstab, I'd appreciate the help

If you have any direct questions, I can give you the passwords needed to enter the site as well as e-mail the code that I'm currently using."
   

- Advertisement -