Thread: No Crosstab Like Access?
03-30-06, 19:50 #1Registered User
- Join Date
- Jul 2004
- Edmonton, Canada
Unanswered: No Crosstab Like Access?
I'm trying to port a dymanically renderred form from a .mdb to a .adp. In the Access .mdb. The form is a representation of a crosstab query with unknown column headings (hence, the need for the form to be dynamically rendered at runtime).
I tried to port the crosstab from the .mdb to a stored procedure, but SQL Server doesn't like TRANSFORM, and perhaps the PIVOT as well. How do you do this in sql server?:
TRANSFORM Count(d.CAR_INIT) AS CountOfCAR_INIT
SELECT b.WKLD_SEQ, c.TRN_ID, c.TRK_NBR
FROM ((TSA_HS_MPCT_CNT a INNER JOIN TSA_HS_COMB2 b ON a.RECC_COMB_ID = b.COMB_ID)
INNER JOIN TSA_HS_WKLD c ON b.WKLD_ID = c.WKLD_ID) INNER JOIN TSA_HS_OBJ_TRN d ON c.WKLD_ID = d.WKLD_ID
GROUP BY b.WKLD_SEQ, c.TRN_ID, c.TRK_NBR
PIVOT d.LST_HMP_DTM + d.OBJ_DEP_TRN
03-30-06, 23:14 #2Registered User
- Join Date
- Dec 2002
Not in SQL 2000 (or SQL 7.0). PIVOT supposedly works in SQL 2005, but I have not seen it/worked with it.
Look at AGS Crosstab or RAC for SQL. Both are 3rd party add-ons for SQL.
hmscottHave you hugged your backup today?