Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 2 of 2 total |
Sub-Select syntax not working |
Tue, Dec 8 2009 11:50 AM | Permanent Link |
steve | Hi All,
I have a query that works in both Paradox and Firebird but not in DBISAM. select * from testdef td where td.dbversion = (select max(dbversion) from testdef td2 where td2.testid = td.testid and td2.language = td.language) In DBISAM, I get an DBISAM Engine Error # 11949 "SQL parsing error - Expected ) but instead found max". What is wrong with this syntax and how would I modify it for DBISAM? Thanks.... |
Tue, Dec 8 2009 3:52 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Steve,
<< In DBISAM, I get an DBISAM Engine Error # 11949 "SQL parsing error - Expected ) but instead found max". What is wrong with this syntax and how would I modify it for DBISAM? >> DBISAM does not support using sub-queries as scalar values. To get what you want, use this script: select testid, language, max(dbversion) as MaxVersion into '\memory\temp' from testdef GROUP BY testid, language; select td.* from testdef td INNER JOIN '\memory\temp' ON td.testid = temp.testid and td.language = temp.language and td.dbversion=MaxVersion -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, April 18, 2024 at 10:42 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |