![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 11 to 18 of 18 total |
![]() |
Wed, Sep 11 2013 9:47 PM | Permanent Link |
Pierre du Plessis Comproware | Hi Guys,
I wanter to opt for the easy option and ended up doing this: SELECT R.*, (SELECT DISTANCE FROM Stations S WHERE R.Station_ID=S.ID) As DISTANCE, (SELECT STATION FROM Stations S WHERE R.Station_ID=S.ID) As STATION, (SELECT LONGITUDE FROM Stations S WHERE R.Station_ID=S.ID) As LONGITUDE, (SELECT LATITUDE FROM Stations S WHERE R.Station_ID=S.ID) As LATITUDE FROM Races R ORDER BY XDATE, RACE_TYPE, TRAINING RequestSensitive=True ReadOnly=False I'm still getting the error: Cannot edit a readonly dataset? Can you perhaps point out where I'm misunderstand things? Many thanks Pierre |
Wed, Sep 11 2013 9:54 PM | Permanent Link |
Pierre du Plessis Comproware | Hi there,
Removing the ORDER BY clause makes it work. I guess to sort it in a specific order, will require one of the other options, such as a temp or memory table? Thanks Pierre |
Thu, Sep 12 2013 3:25 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Pierre
>Removing the ORDER BY clause makes it work. I guess to sort it in a specific order, will require one of the other options, such as a temp or memory table? Nope - just an index on the columns you want to order by. I think you'll need a compound index including XDATE, RACE_TYPE, TRAINING but my memory is failing so it may be three separate ones but without trying it I'm pretty sure that the ORDER BY clause is the place where compound indices are needed. Roy Lambert [Team Elevate] |
Thu, Sep 12 2013 6:37 AM | Permanent Link |
Pierre du Plessis Comproware | > I think you'll need a compound index including XDATE, RACE_TYPE, TRAINING but my
> memory is failing so it may be three separate ones but without trying it I'm pretty sure that > the ORDER BY clause is the place where compound indices are needed. Thanks Roy, I will give it a go. Pierre |
Thu, Sep 12 2013 8:37 AM | Permanent Link |
Raul ![]() | Pierre,
Just to add to what Roy said the docs cover most cases quite well: http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Result_Set_Cursor_Sensitivity In your case point #5: (for getting a sensitive result set) There is no ORDER BY clause in the SELECT statement, or there is an ORDER BY clause that minimally matches the columns, and the collations defined for the columns, in an existing index in the source table. Raul On 9/12/2013 6:37 AM, Pierre du Plessis wrote: > Thanks Roy, I will give it a go. |
Thu, Sep 12 2013 10:14 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Raul
Reading the manual is regarded as cheating! Roy Lambert |
Thu, Sep 12 2013 10:35 AM | Permanent Link |
Raul ![]() | It's my secret weapon when i want to make it look like i still know
something ![]() Raul On 9/12/2013 10:14 AM, Roy Lambert wrote: > Reading the manual is regarded as cheating! |
Thu, Sep 12 2013 7:55 PM | Permanent Link |
Pierre du Plessis Comproware | All clear now - thanks guys - I guess you would suggest me to RTFM
![]() |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
This web page was last updated on Monday, June 30, 2025 at 12:49 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |