Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 21st, 2003, 12:39 PM
Authorized User
 
Join Date: Oct 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sorting in Data Grid

I keep getting this error when trying to sort by OrderID within a datagrid:
The specified field 'OrderID' could refer to more than one table listed in the FROM clause of your SQL statement.

I have seen from other Forums that this usually occures when you do not have an alias for DB tables and columns are specificly defined. Here is my SQL:

SELECT DISTINCTROW [Order Details].OrderID, Sum(CCur([UnitPrice]*[Quantity]*(1-[Discount])/100)*100) AS Total, Orders.OrderDate, Orders.CustomerID
FROM Orders INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID
GROUP BY [Order Details].OrderID, Orders.OrderDate, Orders.CustomerID;

Any one have ideas?

Also, does anyone know how to sort a Sum field?






Similar Threads
Thread Thread Starter Forum Replies Last Post
about grid view sorting rdinesh1975 ASP.NET 2.0 Professional 3 August 9th, 2007 05:27 AM
client side sorting and paging in data grid prankur ASP.NET 1.0 and 1.1 Basics 1 February 3rd, 2006 12:05 PM
client side sorting and paging in data grid prankur ASP.NET 1.0 and 1.1 Professional 1 February 3rd, 2006 12:00 PM
Data grid sorting on page 707 matejx BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 6 December 2nd, 2005 05:43 AM
trying to load db data into data grid itsajourney Beginning VB 6 2 June 7th, 2005 12:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.