web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Populating new field with SQL

(0) ShareShare
ReportReport
Posted on by

Hi All,

I need to populate a new field via sql Which uses values from two Tables. These Include the Prod. Order Line and Prod. Order Components. I'm trying to get a "Pick Qty Outstanding" which is essentailly..

( Prod Order Line."Quantity" * Prod. Order Component."Quantity Per") - Prod. Order Component."Qty. Picked"

The new field will be on the Prod. Order Component Table.

Can anyone advise me on how to do such joins in SQL. Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Technically you can use such a query:

    update poc set [Pick Qty Outstanding]=

    ( pol."Quantity" * poc.[Quantity per]) - poc.[Qty_ Picked]

    from [Your Company$Prod_ Order Component] poc

    join [Your Company$Prod_ Order Line] pol

    on pol.Status=poc.Status and pol.[Prod_ Order No_]=poc.[Prod_ Order No_]

    and poc.[Prod_ Order Line No_]=pol.[Line No_]

    Before running please replace "Your Company" by yours one.

    But I'm not really sure that your formula makes sense...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans