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 ADO specific questions for use with SalesLogix. View the code of conduct for posting guidelines.
|
|
|
|
Problem with subquery in 7.2
Posted: 11 Dec 07 3:32 PM
|
I wrote a custom import tool that creates Contacts from an Excel file. In the tool I have SQL that includes a JOIN to a subquery - working just great in 6.2.3. Now in the process of upgrading to 7.2, the same code causes an error: "Subquery is not supported". Really? Did the provider de-evolve? Is there another approach anyone can recommend? Here's the entire statement:
SELECT A1.C_CONTACTIMPORTID, A1._ACCOUNT, A1._CITY, A1._STATE, A4.ACCOUNTID, A4.ACCOUNT, A4.CITY, A4.STATE FROM C_CONTACTIMPORT A1 JOIN (SELECT A2.ACCOUNTID, A2.ACCOUNT, A3.CITY, A3.STATE, LEFT(A2.ACCOUNT,6) + LEFT(A3.CITY,3) + LEFT(A3.STATE,2) AS 'matchcode' FROM ACCOUNT A2 JOIN ADDRESS A3 ON A2.ADDRESSID = A3.ADDRESSID ) A4 ON LEFT(A1._ACCOUNT,6) + LEFT(A1._CITY,3) + LEFT(A1._STATE,2) = A4.matchcode ORDER BY (LEN(A1._ACCOUNT) - LEN(A4.ACCOUNT)) ASC, A4.ACCOUNT ASC |
|
|
|
Re: Problem with subquery in 7.2
Posted: 12 Dec 07 10:49 AM
|
I feel your pain. I just went through an upgrade from 6.2.3. The 7.2 Provider does not support derived Tables. (This is the problem) (SELECT A2.ACCOUNTID, A2.ACCOUNT, A3.CITY, A3.STATE, LEFT(A2.ACCOUNT,6) + LEFT(A3.CITY,3) + LEFT(A3.STATE,2) AS 'matchcode' FROM ACCOUNT A2 JOIN ADDRESS A3 ON A2.ADDRESSID = A3.ADDRESSID ) A4
However Views are supported in 7.2 so you can create a view instead of the derived table, and use that in your query. |
|
|
| |
|
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!
|
|
|
|
|