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
2016-04-22 00-29-45
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.
UserImage.jpg
É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
 
2016-04-22 00-29-45
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.

UserImage.jpg
É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 GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.