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:
01392049
Views:
43
>No problem, I'm glad you posted the solution, it may be very helpful to others facing the same problem.

The one I pasted previously had some issues the updated one is below:
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 H.iID, p2.iID AS iPK FROM mItems p2
   JOIN Hier H on p2.iPID = H.iPK) 
SELECT ...
      JOIN Hier
         ON sBOMIItem.iItemID = Hier.iID
...
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform