17
Views
4
Comments
AdvanceSQL
Question

Hello friends.

I have the following problem:

I'm creating a simple AdvanceSQL, where I have a select and groupby an attribute from my database.

In the AdvanceSQL test, it returns the records correctly.

However, when I call the function on screen, only one record returns.

In Debug it is proven that the result of AdvanceSQL is returning only one record.

My screen parameters are the same as those entered in the AdvanceSQL test.

I can't use Aggregate because I'm using offset in the query. I took it out just to demonstrate the example.

Has anyone been through something similar?


Follow my query and my SQL return structure


Rank: #633

David Willian Marcondes wrote:

Hello friends.

I have the following problem:

I'm creating a simple AdvanceSQL, where I have a select and groupby an attribute from my database.

In the AdvanceSQL test, it returns the records correctly.

However, when I call the function on screen, only one record returns.

In Debug it is proven that the result of AdvanceSQL is returning only one record.

My screen parameters are the same as those entered in the AdvanceSQL test.

I can't use Aggregate because I'm using offset in the query. I took it out just to demonstrate the example.

Has anyone been through something similar?


Follow my query and my SQL return structure



Check the attribute MaxRecords from the AdvancedSQL Element.


There is no limit.

This is the test result in AdvanceSQL. I removed all parameters to test.
This is the result of debugging also without parameters, looking for all records for testing.

Rank: #139

Hi David,


can you look at what you are doing with the result of that sql afterwards.  Judging by your screenprints, it looks like Outsystems Platform detected that you are only ever using the first record of that list, and optimized to only return that.  Look at -optimized- value for length, for example.


Dorine

Rank: #558

Hi David,

Can you show the properties for the table please. Do you know what the offset value is when you only get 1 record back?

Thanks,

David