Re: crosstab for MS SQL

From: Date: Fri, 27 Dec 2002 19:34:24 +0000
Subject: Re: crosstab for MS SQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-24434@lists.php.net to get a copy of this message
Have you tried the MS Access Syntax ? - e.g.: TRANSFORM Sum(cube_by_c.netc_bd) AS [Summe von netc_bd] SELECT cube_by_c.pthr_product_c AS PROD_C, xref_prod.pthr_desc_x AS [DESC] FROM cube_by_c LEFT JOIN xref_prod ON cube_by_c.pthr_product_c = xref_prod.pthr_product_c WHERE (((cube_by_c.country_iso3_c)="DEU")) GROUP BY cube_by_c.pthr_product_c, xref_prod.pthr_desc_x PIVOT cube_by_c.yyyymm; regards, markus "Sommai Fongnamthip" <sommai@thaithanakit.co.th> schrieb im Newsbeitrag news:5.1.0.14.2.20010924180544.022b8d80@langsuan.thaithanakit.co.th... > Hi, > MySQL has a method to write Crosstab method but It can't use with MS > SQL. Did someone know how to write SQL statement for make cross tab with > MS SQL 6.5 (both ODBC and TDS connection)? > > Thank you > SF >

« previous php.db (#24434) next »