Exercise Booking - SQL Statement warning

I'm doing the booking exercise and testing two diferent's ways to do the exercise. In Module 5 exercise, when we use the SQL statement, i get a warning saying "Unexpected SQL:Unexpected 'not' in SQL statement of SQL1".

The curiosus of this situation is that this warning apears in the "test aplication" that i iniciate after make de upgrade of the Development Environment, because i got another "test aplication" identical made before de upgrade, and that warning don't appears. Both aplication and statements are identical.

Is this due the upgrade of the Development?
Hi Pedro,

The warning on the SQL is due to out parser limitations. We are not covering the complete SQL syntax.
The differences between the 2 versions are strange but it may be due to some changes on the SQL parser, I don't really know...
Wasn't the warning previously hidden?


Hi Hélio,

I attached the image of the earlier version, identical to the image i attached before with the warning, and it seems that there is no warning hidden.

Best regards
Hi again Pedro,

I can confirm that we've made changes to the SQL parser and we are looking at this issue.
You can ignore the warnign message.

We will fix this warning in one of the next revisions.

Thanks for the heads up.

Hello again,

Thanks for the info...and i have been ignored that warning. It works anyway.


i have an error enexpected 'from' in sql statement SQL1 as you'll see at this attach


I know this post is outdated already, but i just want to make the following remark.

In the exercise the Get Availabe Room button had the following SQL:

SELECT {Room}.*
FROM {Room}
WHERE @NumberOfAdults > 0          -- my inserted comment for clarity
             and {Room}.[AdultsCapacity] >= @NumberOfAdults
             and {Room}.[AdultsCapacity] + {Room}.[ChildrenCapacity] >= @NumberOfAdults + @NumberOfChildren
             and not exists
            (SELECT 1
             FROM {Booking}
             WHERE {Booking}.[RoomId] = {Room}.[Id]
                          and (@CheckInDate between {Booking}.[CheckInDate] and {Booking}.[CheckOutDate]-1
                          or @CheckOutDate between {Booking}.[CheckInDate]+1 and {Booking}.[CheckOutDate])
                          and {Booking}.[StatusId] <> @CanceledStatus)
ORDER BY {Room}.[Price] ASC

I had been stuck for days with this SQL aggregate not returning the right room in runtime and always returning room 101 for any number of adults.

However, testing it in designtime, it gave the correct results for the requested number of adults capacity room, e.g. 2 adults room.

Little did i know that, my seems to be valid comment between the SQL query, would had caused this behaviour.

Thanks to my Outsystems teacher my comment was replaced as /* comments */ to get it working.

This is just some info for sharing.