How To Write A While Select Statement

Поділитися
Вставка
  • Опубліковано 12 гру 2024

КОМЕНТАРІ • 12

  • @juanjo29786
    @juanjo29786 2 роки тому +1

    Thank you for this content, I just got the opportunity to became a developer in the company where I work and X++ is totally new for me, but your videos are helping me a lot.

    • @peterramer
      @peterramer  2 роки тому +1

      Thank you for the comment! I am so glad they have been helpful. 😁

  • @ahsannaushad3606
    @ahsannaushad3606 2 роки тому +2

    This is so helpful. Thanks man.

  • @froggio
    @froggio 2 роки тому +1

    great content , thank you Peter, you can continue with Queries , containers, etc :) it would be very helpfull ! :), you are becoming on of the best native english speaker AX source :) thank you for this effort

    • @peterramer
      @peterramer  2 роки тому

      Thank you so much for your kind words.

  • @himanshushekhar1867
    @himanshushekhar1867 2 роки тому +1

    great peter, thank you so much .please make tutorials on SSRS reports of different types. It will be great help

  • @TonyTigerTonyTiger
    @TonyTigerTonyTiger 2 роки тому +1

    Twice you seemed to imply that a while select issues a separate call to the database for each iteration inside its curly braces. But a while select issues a single call to the database to retrieve all of the records for that select statement upfront, storing the records in the table buffer; then the while parts loops through the results 1 record at a time. From the Microsoft docs.
    "In a while select, the select statement itself is executed only one time, immediately before the first iteration of the statements in the loop."

    • @peterramer
      @peterramer  2 роки тому

      Thanks. You are right. I think what I meant to say but didn’t say correctly is this: if you have code like another select statement or find method inside the while select statement, then that will have to run for every loop. So thank you for this.
      Also, if you have an update or insert statement inside of the while select statement, that will cause a call to the database for each loop. But not if you are just reading the data.
      Ideally we want to keep all select statements joined to the while select statement. And better yet, we want to use a update_recordset or insert_recordset so that there is no ‘looping’ or even need to pull data back to D365. It can then all just happen on the database side. Of course, there are many cases where that isn’t possible and ‘while select’ statements are the best tool for the job. Thanks again for your comment.

  • @vigneshkumar9983
    @vigneshkumar9983 2 роки тому

    Really nice......
    What is meant by exist. Join
    And why we have to use Backorder

    • @peterramer
      @peterramer  2 роки тому +1

      An exist join will just check to see if there exists a record in the joined table, and if so, it will return the data in the first table. So it is different from an inner join in that it won’t pull back any data in the second joined table, just the first. Additionally if there is a 1 to many relationship it will still only show the 1 record from the first table. Whereas a 1 to many relationship with a ‘inner join’ statement will pull back as many records exist in the second joined table.
      It definitely is a bit confusing. I recommend you just experiment a bit and look at the results with each type of join. And see how the results change depending on whether there is 0, 1, or more than one, record in the second table. That will help you understand.

  • @perilousb0y
    @perilousb0y 2 роки тому

    how do you create a RDP report

  • @Hugo-gv8qj
    @Hugo-gv8qj 2 роки тому

    Thanks for sharing!!! You may be interested in P R O M O S M.