![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Sat, Jan 4 2020 12:30 PM | Permanent Link |
Greg Hallam Microcalm Solutions Inc | Doesn't work:
Select O.*, (Select Message From (SELECT Message, type, Modtime FROM EventLog Where EventID = O.ID) X WHERE Type = 'BOLcn' Order by ModTime Desc RANGE 1 TO 1) CarrierName From Orders O Order By O.Date Desc, O.OrderNumber ElevateDB Error #700 An error was found in the statement at line 2 and column 87 (Expected column name expression but instead found "O"."ID") Does work: Select O.*, (Select E.Message From EventLog E Where E.EventID = O.ID AND E.Type = 'BOLcn' Order by E.ModTime Desc RANGE 1 TO 1) CarrierName From Orders O Order By O.Date Desc, O.OrderNumber |
Tue, Jan 21 2020 5:51 PM | Permanent Link |
Terry Swiers | Hi Greg,
Your first sub-select is trying to pull a single field from a second sub-select rather than a table or a view. Replace "(SELECT Message, type, Modtime FROM EventLog Where EventID = O.ID)" with a table or view and it should parse correctly. |
This web page was last updated on Wednesday, July 2, 2025 at 06:46 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |