Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Order By Clause Fails to Parse
Kevin Henry
Posts: 7
 
Order By Clause Fails to ParseYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Sep 07 4:52 PM
I have an SQL statement that I recently added some new functionality to and now it is failing to parse. The first query below fails to parse in the client and the ExecuteSQL tool, the second works fine but does not produce the results that I need. If the statements are ran in Query Analyzer they both work fine. Can anyone see why this statement would fail? Keep in mind I am using version 6.2.6 and the queries below are not the actual queries that need to run but are queries that produce the same errors and results.

(replace the accountID with a valid accountid)

#1.
select account, (select top 1 lastname from sysdba.contact where accountid = 'AIRMJA000MRQ' order by lastname desc) from sysdba.account where accountid = 'AIRMJA000MRQ'

#2.
select account, (select top 1 lastname from sysdba.contact where accountid = 'AIRMJA000MRQ') from sysdba.account where accountid = 'AIRMJA000MRQ'
[Reply][Quote]
James
Posts: 3
 
Re: Order By Clause Fails to ParseYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Sep 07 9:59 AM
I had this problem too, I think it does not allow to "order by" in this version
[Reply][Quote]
Vladimir
Posts: 93
 
Re: Order By Clause Fails to ParseYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Sep 07 2:18 AM
you can write another sql...

select top 1 account,lastname from contact where accountid='AIRMJA000MRQ' order by lastname desc

select top 1 a.account,c.lastname from contact c
left join account a on a.accountid=c.accountid
where c.accountid='AIRMJA000MRQ'
order by c.lastname desc

it's more correctly
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/20/2025 11:10:48 AM