Hi Thiran,
You can either filter the query like this
var
MyQuery: Query "You Query Name";
begin
MyQuery.SetFilter(Quantity,<>,0);
MyQuery.Open;
while MyQuery.Read do
begin
// populate the temp table
end;
Myquery.Close;
end;
or you can also add filters dynamically by using in Query Designer, as shown in the example on this Microsoft Learn page:
query 50100 "Your Query Name"
{
QueryType = Normal;
elements
{
dataitem(C; Customer)
{
column(Customer_Number; "No.")
{
}
dataitem(SL; "Sales Line")
{
DataItemLink = "Sell-to Customer No." = c."No.";
SqlJoinType = InnerJoin;
DataItemTableFilter = Quantity = filter(<> 0);
column(Qty; Quantity)
{
}
}
}
}
}
learn.microsoft.com/.../devenv-query-filters
I hope it helps
Regards