General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
ORDER by in a UNION
Hi,
I'm trying to execute the following command using VFP 5.0a:
SELECT field1, ... FROM table 1 UNION SELECT field2,.. FROM table 2 ORDER BY fieldname.
I get an error which states 'Invalid ORDER BY clause.' However, when I reference the column by number, e.g. ORDER BY 3, it orders the result table by the third column. Is there any way to reference the order by clause with a fieldname?
TIA
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only