Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 25, 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: Join tables in select statement
Renee Bender
Posts: 74
 
Join tables in select statementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Sep 08 2:23 PM
I posted this problem in another thread but that that maybe it should be posted here instead. This is my problem:
I hope someone can help me with this. I have a qry that I can run in Query Analyzer but I cannot get it to run in Saleslogix. I keep getting a Failed to Parse error whenever I add that last "Left Join". I don't get the error if I leave off the "Left", but I do get it when I add it in. Also, when it does run, it should give me back 1 record for all of the data in the account_serviceagreem file with a column for contactname that is null. It isn't giving me any data. Can someone please look at this and tell me what I am doing wrong?

strSQL = "SELECT distinct s.*, (c.firstname + ' ' + c.lastname) as contactname, c.workphone "&_
"FROM account_serviceagreem s "&_
"LEFT OUTER JOIN account_misc a on s.parent_no = a.parent "&_
"LEFT JOIN contact_account_role r on a.accountid = r.account_id and r.contact_type = 'L' "&_
"LEFT JOIN contact c on c.accountid = r.account_id and c.contactid = r.contact_id "&_
"WHERE s.account_serviceagreemID = '"& strVal &"' and a.Parent = '"& strVal2 &"' and a.cmcust = '"& strVal2 &"' "

Thanks,
Renee
[Reply][Quote]
Stephen Redmond
Posts: 190
 
Re: Join tables in select statementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Sep 08 7:46 PM
Hi Renee,

I just replied on the other thread. Did that help?


Stephen
[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): 8/25/2025 12:56:22 PM