1. how to program for period-to-period comparisons ?
What's the best way to generate period-to-period comparisons (e.g. for
variance analysis) where you want to generate 2 columns (with different
names, but otherwise similar data-type & values). For example,
SalesCurrent SalesPreviousYear Difference
------------- ------------------- -----------
The difference column, I can handle in the report writer; that part's easy
I was going to generate the "current" and "previous" columns from
parameterized stored procedures, since, assuming large data volumes, I don't
want to simply limit a huge, generic View on the (e.g. VB) client front-end.
In Access (with small data volume) I could join two queries in a third
query; but, Transact_SQL doesn't want parameters in Views (bummer <G> ) ...
and I want to limit the initial recordsets, rather than use a parameterized
stored procedure (step 2) on huge, generic Views (step 1).
Although I have access to SQL Server 2000 (as an MSDN Developer), the data
resides on SQL Server 7 (precluding UDFs ? ).
I'm about to attempt this with "table variables" (i.e. declare variables of
data-type "Table"), but can't find examples in my books ("Guru's Guide to
Transact-SQL"/Ken Henderson, "Programming VB6"/Francesco Balena or the
"Hitchhiker's Guide to VB & SQL Server"/Bill Vaughn). So, it occurred to me
that I might be approaching it all wrong?
The (spreadsheet) need to generate period-to-period variance comparisons is
so common that I was surprised to find NO Transact-SQL examples on it !!!
thanks, in advance, for whatever insights ...
2. dts'ing constraints only
3. Facts that only exist in PERIODS of time
4. SQL Svr 2000 quoted_identifier problem
5. Time periods in a star schema?
6. Locking problems with VB 5.0
7. Precalculated values and time periods
8. SQL2K, Outlook & Security
9. Time Dimension for Fiscal Calendar with 13 periods
10. Parallel Periods and Relative Times ????
11. Consolidating Contiguous Time Period Rows into one!!!
12. Lock Request Time out Period ..
13. Should time period be datetime?