You are here: Re: I want to parse @ArrayOfDays into @d1 through @d5 « MsSQL Server « IT news, forums, messages
Re: I want to parse @ArrayOfDays into @d1 through @d5

Posted by Erland Sommarskog on 10/01/07 21:37

bobc (bcanavan@fmbnewhomes.com) writes:
> Here is an example of what I'm trying to do: Populate a grid(below)
> on a .net dashboard web page with counts of various types of
> activity(y axis) that would be distributed into bins(x axis) . The
> datasource would be a single table or simple view(no aggregates). The
> bins would represent increments in specific criteria, which would NOT
> necessarily involve sequential values such as days of the month. (The
> actual page will contain several grids, each having a different number
> of bins. I would like to use the same code for all grids, if possible
> -- sending the datasource, number of bins, and bin criteria as input
> parameters.)
>...
> I could call 20 different stored procedures, each having n SELECT
> statements, but we all know a whole list of reasons why that's a bad
> idea.

Why would you have different procedures for different activities?

I will have to admit that I don't get a very good understanding of
what you are trying to achieve. But a standard recommendation is that
you post:

1) CREATE TABLE statement for your table(s).
2) INSERT statements with sample data.
3) The desired result given the sample.

Of course, this assumes that the data model is set, and neither that is
clear to me. Then again, if you post what you have now, we may get a
better grip of where you're heading.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация