B
Brian P. Hammer
Cross Posted = 3
All - I have a SQL statement that I used in access and VB.Net to display as a pivot table and a chart on a VB form. I am now in the process of changing it all over to SQL data adapters. I cannot seem to get the Access statement to covert over to SQL. I get an error stating that there is an error at or before SoldRetailPrice. This worked just fine in the Access back end with straight ADO code but does not for the Data Adapters.
Dim sqlPivotData As String = "TRANSFORM Avg([SoldRetailPrice]/[AverageEquipmentPrice])" & _
"AS PercentValue Select YearOfManufacturer FROM tblAircraftRetail INNER JOIN " & _
"tblSoldHistory ON tblAircraftRetail.IDAircraftRetail = tblSoldHistory.RetailHistoryID " & _
"GROUP BY tblAircraftRetail.YearOfManufacturer, tblAircraftRetail.IDAircraftRetail " & _
"PIVOT [YearOfSale]+([QuarterOfSale]/10)"
Thanks,
Brian P. Hammer
All - I have a SQL statement that I used in access and VB.Net to display as a pivot table and a chart on a VB form. I am now in the process of changing it all over to SQL data adapters. I cannot seem to get the Access statement to covert over to SQL. I get an error stating that there is an error at or before SoldRetailPrice. This worked just fine in the Access back end with straight ADO code but does not for the Data Adapters.
Dim sqlPivotData As String = "TRANSFORM Avg([SoldRetailPrice]/[AverageEquipmentPrice])" & _
"AS PercentValue Select YearOfManufacturer FROM tblAircraftRetail INNER JOIN " & _
"tblSoldHistory ON tblAircraftRetail.IDAircraftRetail = tblSoldHistory.RetailHistoryID " & _
"GROUP BY tblAircraftRetail.YearOfManufacturer, tblAircraftRetail.IDAircraftRetail " & _
"PIVOT [YearOfSale]+([QuarterOfSale]/10)"
Thanks,
Brian P. Hammer