5/4/2026 1:38:17 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.
|
|
|
|
Using Partition by in a SQL statement in a script
Posted: 30 Oct 07 12:07 PM
|
I'm using (trying to use) a SQL statement to return a recordset. The statement includes a partition by subtotal as one of the columns. I'm working against SQL 2005. The statement works fine directly against MSSQL, but fails with "unable to parse sql" when run from my script in SLX. Is partition by not supported?
Maria |
|
|
|
Re: Using Partition by in a SQL statement in a script
Posted: 30 Oct 07 4:06 PM
|
I haven't checked specifically, but probably not. The SLX OLEDB provider implements standard ANSI SQL circa 1952 (just kidding).
So you'll need to find another way: if you're just returning a read-only recordset, you have several options. One is to create a direct (SQL) connection in code and execute the query through that (in the knowledge that you are bypassing any user security). Alternatively, maybe you can create a view in SS2005 which already contains the subtotals and SELECT from that?
PP |
|
|
|
Re: Using Partition by in a SQL statement in a script
Posted: 31 Oct 07 9:46 AM
|
Maybe 1960?
In a burst of genius I remembered this client has Sql 2000 anyway so I've found another way to manage my recordset. I was using a simple partition by to count the number of records that matched a certain criteria. Then when I looped through the record set I could increment and know when I'd reached the end of each like set. It was so easy it had to fail!
Maria |
|
|
|
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!
|
|
|
|
|
|
|
|