|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help please an ASP/SQL beginner!
I'm trying to create a Crosstab table on an ASP page from Access 2000 and can't get the Transform Statement past the Syntax Error stage. My SQL (taken from the Crosstab Query in Access with attempt to modify) is as follows: strSQL = "TRANSFORM Sum(OrdersMexico.Quantity) AS SumOfQuantity"& _ "SELECT ProgrammeMexico.DepotDate, ProgrammeMexico.DepotDay"& _ "FROM ProgrammeMexico INNER JOIN (Products INNER JOIN OrdersMexico ON Products.ProductID = OrdersMexico.ProdID) ON ProgrammeMexico.ProgrammeMexID = OrdersMexico.ProgMexID"& _ "GROUP BY ProgrammeMexico.DepotDate, ProgrammeMexico.DepotDay"& _ "ORDER BY ProgrammeMexico.DepotDate, Products.ProdRef"& _ "PIVOT Products.ProdRef;" The message on the displayed page is: Error: -2147217900 Description: [Microsoft][ODBC Microsoft Access Driver] Syntax error in TRANSFORM statement. Please help Thanks |
|
#2
|
|||
|
|||
|
I don't know if this will help, but I haver noticed that if I don't have a space before the ", I get errors
For Example: SumOfQuantity"& _ Should Be SumOfQuantity "& _ Tyr this and let me know. S- |
|
#3
|
|||
|
|||
|
Thanks very much. It worked.
David |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > SQL Syntax Error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|