Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 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!
 Administration Forums - General Administration
Forum to discuss general administration topics for SalesLogix (including LAN & remote topics). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to General Administration | New ThreadView:  Search:  
 Author  Thread: SLX Query Builder Removing Conditions on Execution
Chris Burriss
Posts: 120
 
SLX Query Builder Removing Conditions on ExecutionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 May 10 5:28 PM
I have a custom table with accounting data. When I run the SQL statement from "View SQL" in the Query Builder, it's clear that the SQL is correct. I profile a refresh of the group and SLX is taking the correct query...

SELECT A1.ACCOUNTID, A1.ACCOUNT, A2.TRANSTYPE A2_TRANSTYPE, A2.TXNDATE A2_TXNDATE, A2.REFNUMBER A2_REFNUMBER,
A2.PONUMBER A2_PONUMBER, A2.ISPAID A2_ISPAID, A1.ACCOUNT_UC
FROM sysdba.ACCOUNT A1
LEFT OUTER JOIN sysdba.C_QBTRANSHEADER A2 ON (A1.ACCOUNT=A2.COMPANYNAME)
WHERE (A2.TRANSTYPE='Invoice')
ORDER BY A1.ACCOUNT_UC ASC

And executing it as...

SELECT A1.ACCOUNTID, A1.ACCOUNT, A2.TRANSTYPE A2_TRANSTYPE, A2.TXNDATE A2_TXNDATE, A2.REFNUMBER A2_REFNUMBER, A2.PONUMBER A2_PONUMBER,
A2.ISPAID A2_ISPAID, A1.ACCOUNT_UC,A1.SECCODEID SLXSECCODEID9
FROM sysdba.ACCOUNT A1
LEFT OUTER JOIN sysdba.C_QBTRANSHEADER A2 ON (A1.ACCOUNT=A2.COMPANYNAME)
WHERE A1.ACCOUNTID IN ('A6UJ9A00007C','A6UJ9A00006G',...,'A6UJ9A0000DF','A6UJ9A0000DF','A6UJ9A0000DF')
ORDER BY A1.ACCOUNT_UC ASC,A1.ACCOUNTID

Notice that the trans type condition is completely removed resulting in an incorrect dataset. I have no idea why it is doing that. I appreciate any ideas you may have! Thank you!

C. Burriss
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: SLX Query Builder Removing Conditions on ExecutionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 May 10 12:08 AM
Have you verified that you are executing the same group? And/or that the Group releases are correct?

Things to check:
- Check for Groups with the same name that aren't based on the Group that you updated.
- Look at the Modify date (after you update releases) to make sure that all associated releases are executed.
- When tracing the group, look for the query against the Plugin table (to get the group info) that is executed to get the PluginID of the group that actually executes.
[Reply][Quote]
Chris Burriss
Posts: 120
 
Re: SLX Query Builder Removing Conditions on ExecutionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 May 10 5:20 PM
Thanks, Raul. I checked out those things and nothing seems out of the ordinary. This is so odd. I haven't a clue what is going on unless I've uncovered a defect.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: SLX Query Builder Removing Conditions on ExecutionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 May 10 2:18 AM
The fact that your SQL contains the sysdba prefix is unusual. When I do View SQL with standard groups, there is no prefix. If you check your other groups (eg All Accounts), does the prefix appear there?
[Reply][Quote]
Chris Burriss
Posts: 120
 
Re: SLX Query Builder Removing Conditions on ExecutionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 May 10 9:28 AM
Hi Phil,

That's an excellent observation but I'm afraid I've led you astray. I had ran the queries in SQL Server to confirm the resultset and must have failed to remove sysdba from the query when copying. I've compared an out-of-the-box group vs. a new custom group (doesn't work) and sysdba doesn't show up via "View SQL" or in the SLX Profiler. Thank you.

By the way, this is in relation to v7.5.2.

C. Burriss
[Reply][Quote]
Nick McLean
Posts: 50
 
Re: SLX Query Builder Removing Conditions on ExecutionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 May 10 9:27 AM
Hi Chris

SLX is trying to optimise by building the group based on accountids rather than the actual condition (using server side cursers).

Try ticking the 'return distinct rows only' checkbox on the defaults tab of the query builder - that will change the cuser to client side and force the client to run the sql that you have written.

Good luck
nick
[Reply][Quote]
Chris Burriss
Posts: 120
 
Re: SLX Query Builder Removing Conditions on ExecutionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 May 10 10:52 AM
Nick,

That did the trick! Thanks!

C. Burriss
[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): 11/26/2024 4:55:17 AM