Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Élson Araújo
0
Views
4
Comments
Search with Advanced Query
Question
Hi. I set up the search of available rooms with adv.SQL query but an error came up. " The output Structure must be set in AdvQuery1".
Thanks
Nuno Reis
MVP
Although you filled the FROM in the Advanced Query, you still need to defined the output structure just like in a regular Query.
Where is an example to return Users table in both formats.
You can add several tables, of use a structure previously made by yourself if only a few fields are needed (for instance, if Group By is involved)
Do the Structure before by going to Data -> Structures -> Add Structure and Add Structure Attribute for each wanted field. You can also simply drag existing Attributes.
Élson Araújo
Ok, now the structure it´s working and searching but when i test theres an syntaxe error! The SQL it´s simple, i think theres no Error.
SELECT {Room}.*
FROM {Room}
WHERE @NumberOfAdults > 0 ;
Thanks Nuno
Nuno Reis
MVP
@ prefix is for parameters, probably your condition should be over the attribute: {Room}.NumberOfAdults>0
But for such a query, you don't need Advanced Query.
Élson Araújo
It´s not just that SQL but the rest of it its quiet simple. ok, i already catch the error, was about the variables, data types!
Thanks Nuno
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...