| | |
make sth. like pivot with mssql 2000
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2009
Posts: 1
Reputation:
Solved Threads: 0
--query of a very large table
SELECT
abc AS 'productname',
xyz AS 'quantity'
INTO #tmptable
FROM
dfg
WHERE
blah
--
--content of #tmptable:
--productname quantity
--product1 5
--product2 3
--product1 2
--product2 8
--product1 5
--
how does a query on #tmptable look like, if I want to receive the following result?
productname quantity
product1 12
product2 11
???
thank you in advance!
SELECT
abc AS 'productname',
xyz AS 'quantity'
INTO #tmptable
FROM
dfg
WHERE
blah
--
--content of #tmptable:
--productname quantity
--product1 5
--product2 3
--product1 2
--product2 8
--product1 5
--
how does a query on #tmptable look like, if I want to receive the following result?
productname quantity
product1 12
product2 11
???
thank you in advance!
Have a look on http://sqlserver2000.databases.aspfa...vot-query.html
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
![]() |
Other Threads in the MS SQL Forum
- Previous Thread: Where is AlwaysUseDefaultCodePage?
- Next Thread: Copying ASP.NET's default member info database
| Thread Tools | Search this Thread |
Tag cloud for MS SQL
"last autogrowth business connectingtodatabaseinuse count cursor data database dateadd datepart day" dbsize deadlock delete_trigger getdate highperformancecomputing hpc hpcserver2008 ibm iis loop maximum microsoft ms mssql multiple multithreading news number permission query reporting result server services sets source sql sqlserver sqlserver2005 supercomputing tables uniqueid update view weekday






