July 27, 2021 at 8:37 pm
Do you have a way to use a recurser query with a stored procedure i have run into an issue to make a recurser query to show what products were consumed in a work order I need to be able to have the user enter the work order number and LOT and Sublot? then that info is fed into the recurser query. is that something that is possible in SQL?
July 27, 2021 at 8:49 pm
Should be. What do you need the recursion for, getting component parts?
July 27, 2021 at 9:01 pm
So when the user types in SKU they want all the components that were consumed to make that work order.
July 27, 2021 at 10:25 pm
So you query and find all the components of the stuff in the work order that have no children - because that's the definition of the lowest part on the component tree.
July 28, 2021 at 5:41 am
As you have not provided us with any sample DDL or data, we cannot give you a coded solution. But the answer to the question: "Can queries in SQL Server be recursive?" is yes.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply