查询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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
相关资源
相似解决方案