Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2007
    Location
    Global Village
    Posts
    185

    Exclamation Unanswered: SQL TRANSFORM Statement

    Hi Guys/Gals,
    I recently upsized my back-end data base to SQL 2008 and busy with fixing incompatibilities and errors, I got stacked in the following problem and need your help:
    I have a crosstab query which was fine before upsizing but it doesn't work now, here is the SQL Statement:
    Code:
    strSQL1 = "TRANSFORM Count(tbl_doc.[Document Number]) AS [CountOfDocument Number] " _
                & "SELECT 14-(Date()-[Receive Date]) AS Days " _
                & "FROM tbl_main INNER JOIN (tbl_dates INNER JOIN tbl_doc ON tbl_dates.ID = tbl_doc.ID1) ON tbl_main.ID = tbl_dates.ID1 " _
                & "WHERE (((14-(Date()-[Receive Date])) Between 1 And 14) AND ((tbl_doc.AnswerDate) Is Null)) " _
                & "GROUP BY 14-(Date()-[Receive Date]) " _
                & "PIVOT tbl_doc.Discipline;"
    I couldn't find the TRANSFORM Statement in a SQL book that I've got.
    here is the error No.: ODBC – call failed. (Error 3146)
    In fact a few other Cross tab querys in db don't work
    Last edited by Aran1; 04-29-08 at 02:22.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    TRANSFORM is not supported by MSSQL; take a look at PIVOT in BoL
    George
    Home | Blog

  3. #3
    Join Date
    Sep 2007
    Location
    Global Village
    Posts
    185
    Thanx georgev for reply, but I didn't find anything about PIVOT in my SQL book as well as Access help.
    can you explain more or give me the link to proper information?
    Cheers

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    have you tried BoL? SQL Server Books onLine

Posting Permissions

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