2011-12-21 100 views

回答

1

SQL来拯救你:

static void UtilElement2Layers(Args _args) 
{ 
    UtilIdElements uc, u1, u2; 
    while select uc 
     where uc.recordType == UtilElementType::Class 
     exists join u1 
     where u1.parentId == uc.id 
      && u1.utilLevel == UtilEntryLevel::cus 
     exists join u2 
     where u2.parentId == uc.id 
      && u2.utilLevel == UtilEntryLevel::syp 
     // && u2.id == u1.id 
    { 
     info(uc.name); 
    } 
} 
相关问题