Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 8 of 8 total |
Problem with derived table |
Mon, Dec 8 2008 5:09 AM | Permanent Link |
UliBecker | This code works:
< select PatientenID, list(cast(datum as varchar)) from (select distinct ScheineID,PatientenID,datum from anforderungen order by datum ) as AnforderungenTemp group by patientenid > while this doesn't: < insert into ReportKasseScheine select PatientenID, list(cast(datum as varchar)) from (select distinct ScheineID,PatientenID,datum from anforderungen order by datum ) as AnforderungenTemp group by patientenid > It says: "ElevateDB Error #700 An error was found in the statement at line 4 and column 73 (Expected ) but instead found order)". I am using the derived table to order the date in the list. Regards Uli |
Mon, Dec 8 2008 12:03 PM | Permanent Link |
Fernando Dias Team Elevate | Uli,
The problem is the ORDER BY clause - it's not allowed in this context. Anyway, just for curiosity, why would you care for the order of the inserted rows? -- Fernando Dias [Team Elevate] |
Mon, Dec 8 2008 12:32 PM | Permanent Link |
Uli Becker | Fernando,
> The problem is the ORDER BY clause - it's not allowed in this context. I guessed that. > Anyway, just for curiosity, why would you care for the order of the > inserted rows? Please note that the "order by"-clause does NOT refer to the order of the inserted records. It's just to bring the list of dates in the correct order (list(cast(datum as varchar))). I don't know a way to order the result of a list() function except using a derived table. Otherwise I wouldn't use the derived table. Uli |
Mon, Dec 8 2008 12:39 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< while this doesn't: >> I'll get a fix for this in 2.02 B5. It's an issue with the INSERT..SELECT parsing criteria being carried on to the derived table. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 8 2008 1:26 PM | Permanent Link |
Uli Becker | Tim,
> I'll get a fix for this in 2.02 B5. It's an issue with the INSERT..SELECT > parsing criteria being carried on to the derived table. Thanks. P.S. Is there another way to get an alphabetically ordered list execpt using a derived table? Regards Uli |
Mon, Dec 8 2008 1:43 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< P.S. Is there another way to get an alphabetically ordered list execpt using a derived table? >> Other than a view instead of a derived table, no. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 8 2008 5:33 PM | Permanent Link |
Fernando Dias Team Elevate | Uli,
> Please note that the "order by"-clause does NOT refer to the order of > the inserted records. It's just to bring the list of dates in the > correct order (list(cast(datum as varchar))). Ah, yes. Sorry, I wasn't "parsing" your statement correctly -- Fernando Dias [Team Elevate] |
Tue, Dec 9 2008 2:24 AM | Permanent Link |
Uli Becker | Fernando,
> Ah, yes. > Sorry, I wasn't "parsing" your statement correctly No problem. Thanks for parsing it at all. Saludos Uli |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |