Subject Ordering by lookup column ?
Author slsolutions2002
I have a query that looks up a description in a lookup query.

The SQL is:

SELECT COSTCATEGORYNO,
COSTCATEGORYNAME,
COSTCENTERNO,
(SELECT COSTCENTERNAME
FROM COSTCENTERDEFINITIONS D
WHERE D.COSTCENTERNO=C.COSTCENTERNO) AS COSTCENTERNAME,
OVERHEADPERCENT,
REQUIRED,
USED,
POSTED
FROM COSTCATEGORYDEFINITIONS C

I am using this query in a grid. The grid properly displays all of
the columns, including the description selected from the lookup query.

I would like to be able to sort the grid by this looked up column.
The query allows me to set up ordering based on the looked up column
but when I try to click on the grid title to sort by this column I
get a error message telling me the column (COSTCENTERNAME) is not
found.

Is it not possible to order on this column ?

Thanks