Re: SQL Statement
From: Brian P. Hammer (bphammer_at_email.uophx.edu)
Date: 04/20/04
- Next message: Brian P. Hammer: "Re: SQL Statement"
- Previous message: William Stacey [MVP]: "Re: Doing The Impossible"
- In reply to: Greg Obleshchuk: "Re: SQL Statement"
- Next in thread: Dr. StrangeLove: "Re: SQL Statement"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 20 Apr 2004 11:55:46 -0500
Thanks Greg - I'll have to check it out.
-- Brian P. Hammer "Greg Obleshchuk" <greg-n-o-s-p-a-m-@ag-s-o-f-t-w-a-r-e.com> wrote in message news:OU91kcaJEHA.1220@TK2MSFTNGP11.phx.gbl... Hi Brian, TRANSFORM is an Access SQL addition . MS SQL server doesn't support a transform extension. You should rewrite the SQL using group by queries or you can use a third party product try this http://www.ag-software.com/xp_ags_crosstab.aspx -- Kind regards Greg Obleshchuk Partner A & G Software http://www.ag-software.com "Brian P. Hammer" <bphammer@email.uophx.edu> wrote in message news:#fTeHnXJEHA.4052@TK2MSFTNGP11.phx.gbl... 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
- Next message: Brian P. Hammer: "Re: SQL Statement"
- Previous message: William Stacey [MVP]: "Re: Doing The Impossible"
- In reply to: Greg Obleshchuk: "Re: SQL Statement"
- Next in thread: Dr. StrangeLove: "Re: SQL Statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|