zoukankan      html  css  js  c++  java
  • 使用SQL获取TableID

    查询TableID需要从SqlDictionary中查询,此表中存放了TableID和FieldID

    alter procedure GetImageOfItemId @ItemId varchar(20)
    as
    begin
    select top 1 a.itemId,
        b.ACT_DesignNo,
        d.image,
        c.RefTableId
    from inventTable a
        join ACT_DesignNoTable b on a.ACT_DesignNo = b.ACT_DesignNo
        join DocuRef c on c.RefRecId = b.RecId
        join DocuImgs d on d.RefRecId = c.RecId
    where c.RefTableId in (    select tableid
                            from SqlDictionary
                            where fieldId = 0 and
                                name = 'Act_DesignNoTable'
                            )
        and a.itemid = @ItemId
    end
    go

  • 相关阅读:
    bzoj 1977
    bzoj 3389
    bzoj 1064
    codeforces 424D
    codeforces 425C
    codeforces 425D
    codeforces 427E
    codeforces 425E
    codeforces 429D
    codeforces 429E
  • 原文地址:https://www.cnblogs.com/perock/p/2381306.html
Copyright © 2011-2022 走看看