Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, April 26, 2024 
 
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!
 Data & Imports Forums - T-SQL & Queries
Forum to discuss general T-SQL questions and help with queries related to SalesLogix data. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to T-SQL & Queries | New ThreadView:  Search:  
 Author  Thread: Update Script - Failed to parse sql- Please help
Meena
Posts: 12
 
Update Script - Failed to parse sql- Please helpYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Feb 10 6:37 PM
The following sql script run ok on sql managent studio but the slx provider does not like it.
Can someone help put it in the slx syntax

UPDATE sysdba.c_account_ext
set c_account_ext.SECCODEID = sysdba.account.SECCODEID
FROM sysdba.account
WHERE sysdba.c_account_ext.accountid = sysdba.account.accountid
And c_account_ext.seccodeid <> account.seccodeid

Thanks in advance.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Update Script - Failed to parse sql- Please helpYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Feb 10 2:29 AM
Try this:

update c_account_ext
set SecCodeID = (select SecCodeID from Account where Account.AccountID = c_Account.AccountID)

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Update Script - Failed to parse sql- Please helpYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Feb 10 9:51 AM
Now, looking at this from a completely different perspective:

If your Account Extension Table (C_ACCOUNT_EXT) has a One to One Relationship to the Account table, why would you add a SECCODEID column to it (and name it SECCODEID)?
I am not saying that it isn't ok to add multiple Relationships to Owners (e.g. Owner = Sales Team, and Implementation = Implementation Team), however if that was the case I wouldn't call it SECCODEID.


The fact is that (again, if the relationship is one to one) that the C_ACCOUNT_EXT table carries the security from the ACCOUNT record, so by having this column it causes problems with synchronization if it is not properly updated.
For instance, If I change the Owner of the Account using Territory Realingment, but fail to follow it up with an Update script for the Extension table, the Remote reps that receive this records on their database would not have visibility to them. Their screens would load partial data, and they may even receive errors regardign PK violations when trying to update these records.


Now, if the data on the Extension table is indeed to be kept away from certain users, then this approach "may" be ok, but you have to make sure to always use LEFT joins to avoid issues on Detail views, and/or properly maintain Teams and Ownership when reassignig records.
[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 © 2024 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): 4/26/2024 2:45:12 AM