php-db | 2002122

[PHP-DB] Re: crosstab for MS SQL From: MWCT - Markus Weber (mweber <email protected>)
Date: 12/27/02

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 <email protected>> schrieb im Newsbeitrag
news:5.1.0.14.2.20010924180544.022b8d80 <email protected>
> 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
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php