RE: syntax issue between Access and MS SQL

2008-01-23 Thread Gaulin, Mark
Apparently you can't use ORDER BY on the first SELECT, so I presume that the second ORDER BY will be applied to the combined rows. Thanks Mark -Original Message- From: Ben Conner [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 23, 2008 9:04 AM To: CF-Talk Subject: syntax issue

Re: syntax issue between Access and MS SQL

2008-01-23 Thread Jim Wright
On 1/23/08, Ben Conner [EMAIL PROTECTED] wrote: SQL = SELECT Products.*, Categories.*, Manufacturers.* FROM Products, Categories, Manufacturers WHERE Products.ManufacturerID IN (Select ManufacturerID from Manufacturers WHERE Manufacturers.ManufacturerName Like '%spank%') AND

Re: syntax issue between Access and MS SQL

2008-01-23 Thread Ben Conner
Hi Jim, Jim Wright wrote: On 1/23/08, Ben Conner [EMAIL PROTECTED] wrote: It is the ORDER BY in the first query that is throwing the errors. Just use a single ORDER BY after all of the UNIONs, and it will order the entire set. Also, do you mean to use UNION ALL? That will result in

Re: syntax issue between Access and MS SQL

2008-01-23 Thread Ben Conner
Hi Mark, Jim-- That was indeed the case. Just didn't see it. Thanks very much! --Ben Gaulin, Mark wrote: Apparently you can't use ORDER BY on the first SELECT, so I presume that the second ORDER BY will be applied to the combined rows. Thanks Mark