Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Self-Join Item Master transactions stock ledger
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Firebird
Application:
Desktop
Miscellaneous
Thread ID:
01391749
Message ID:
01392048
Views:
42
No problem, I'm glad you posted the solution, it may be very helpful to others facing the same problem.

>>Sorry, I have no experience with FireBird and this query looks quite complex to me.
>
>My bad Naomi. It was more like FYI, the later part is complex yes but that is the way I code :) The actual recursive CTE portion is this, but like I said FYI:
>
>
WITH RECURSIVE Hier(iID, iPK) AS
>   (SELECT p.iID, p.iID AS iPK FROM mItems p WHERE p.iID IN (SELECT ID
>         FROM gttItemsSelected
>         WHERE TRIM(JobID) = ?{vp_JobID})
>   UNION ALL
>   SELECT p2.iID, p2.iPID AS iPK FROM mItems p2
>   JOIN Hier on p2.iPID = Hier.iID)
>SELECT ...
>      JOIN Hier
>         ON sBOMIItem.iItemID = Hier.iID
>...
>
>Thanks.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform