Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

AL Range Filter

Posted on by 249

I have below T-SQL Code, wondering how i can get the equivalent on this in AL

DECLARE @projectvalue DECIMAL;
SET @projectvalue=20000;
SELECT ISNULL(Amount,0) FROM PROJECTS WHERE RangeFrom<=@projectvalue and RangeTo>=@projectvalue

Categories:
  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,160 Most Valuable Professional on at
    RE: AL Range Filter

    The filter is equivalent to the following code:

    SETFILTER(RangeFrom,’<=%1’,ProjectValue);

    SETFILTER(RangeTo,’>=%1’,ProjectValue);

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,353 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,251 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans