Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Location
    Edmonton, Canada
    Posts
    72

    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

    Thanks,
    Carl

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    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.

    Regards,

    hmscott
    Have you hugged your backup today?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •