Organization classification, culvert gate and personnel bound to the tree

Source: Internet
Author: User

A table of a total of units, a Han brake table, a personnel Han brake relationship table, and a personnel table (where personnel do not specify Han brake, but do not belong to any unit or Han brake). Based on the relationship between the four tables and levels, displayed on a tree control:
1. Recursive unit;
2. When a unit node is generated, check whether there is a culvert gate based on the link.
3. When a culvert gate node is generated, check whether there are related personnel based on the personnel culvert gate relationship table:
DV. rowfilter = "v_ry_dm in (select distinct v_ry_dm from DBO. da_ry_hz_xd where I _hz_dm = @ I _hz_dm )";
4. When the unit recursion is completed, check whether there are related personnel based on the personnel Han brake relationship table. If yes, the query method is as follows:
DV. rowfilter = "v_ry_dm not in (select distinct v_ry_dm from DBO. da_ry_hz_xd )";

If you encounter such problems, you do not need to analyze them. Use this method directly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.