简体   繁体   English

如何使用已定义的EDT查找所有表?

[英]How to find all tables using a defined EDT?

How does one create a job which finds all tables containing a particular extended data type? 如何创建一项查找包含特定扩展数据类型的所有表的作业?

I found this JOB, but it gives me an error: https://fredshen.wordpress.com/2006/02/05/find-out-tables-containing-specific-edt/ 我找到了这个工作,但给了我一个错误: https ://fredshen.wordpress.com/2006/02/05/find-out-tables- contains-specific-edt /

Use the Cross Reference Tool . 使用交叉参考工具

It will show code uses as well. 还将显示代码用法。

try this: 尝试这个:

static void findEdtinTable(Args _args)
{
    treeNode childNode;
    treeNode fields;
    treenodeIterator it, itFld;

    str properties;
    str table;
    str field;
    str extendedDataType;
    str searchType = "PurchInternalInvoiceId";     // EDT
    int x;
    treeNode t  = TreeNode::findNode('\\Data Dictionary\\Tables');

    it = t.AOTiterator();
    childNode= it.next();
    while (childNode)
    {
      Table = childNode.treeNodeName();
      itFld = t.AOTfindChild(childNode.treeNodeName()).AOTfindChild("Fields").AOTiterator();

      fields = itFld.next();
      while (fields)
      {
        field = fields.treeNodeName();
        properties = fields.AOTgetProperties();
        extendedDataType = findProperty(properties, "ExtendedDataType");

        if (extendedDataType == searchType)
        {
          info(strfmt("%1 / %2 – ExtendedDataType: %3", table, field, extendedDataType));
        }
        fields = itFld.next();
      }
      childNode= it.next();
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM