8/25/2025 12:31:54 PM
|
|
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!
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.
|
|
|
|
Join tables in select statement
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 |
|
|
| |
|
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!
|
|
|
|
|
|
|
|