hi all,
I have a table which contains a date column and a column that contains a numerical value....only 1 record for each date:
(varchar) (smalldatetime) (Int)
DatabaseName Date Qty
Db1 3/1/2009 00:00:00 2501
Db1 4/1/2009 00:00:00 3722
Db2 3/1/2009 00:00:00 1488
Db2 4/1/2009 00:00:00 1754
one record for the 1st day of each month for each DatabaseName
My objective is to select the Quantities for presentation
in an Excel worksheet... but place the quantities across the line for each database.
How can I construct the Select statement so that it selects all quantities for a database name with the results like this:
Db1 2501 3722
Db2 1488 1754
I know it's fairly easy, just dont remember how I did this a few years ago.
Thanks ver much.
John
I have a table which contains a date column and a column that contains a numerical value....only 1 record for each date:
(varchar) (smalldatetime) (Int)
DatabaseName Date Qty
Db1 3/1/2009 00:00:00 2501
Db1 4/1/2009 00:00:00 3722
Db2 3/1/2009 00:00:00 1488
Db2 4/1/2009 00:00:00 1754
one record for the 1st day of each month for each DatabaseName
My objective is to select the Quantities for presentation
in an Excel worksheet... but place the quantities across the line for each database.
How can I construct the Select statement so that it selects all quantities for a database name with the results like this:
Db1 2501 3722
Db2 1488 1754
I know it's fairly easy, just dont remember how I did this a few years ago.
Thanks ver much.
John