表单中有很多picklist字段 不想写链接stringmap
代码:
实体ID查询方法:
SELECT @ObjectTypeCode from Entity where=‘实体名称‘
调用函数方法:
select getpicklist(‘字段名称‘,字段值,实体ID)
--@AttributeName 字段名称 --@AttributeValue 字段值 --@ObjectTypeCode 实体ID create function GetPickList( @AttributeName varchar(100), @AttributeValue int, @ObjectTypeCode int ) returns varchar(100) as begin declare @value varchar(100) SELECT @value=Value FROM StringMap where AttributeName=@AttributeName AND AttributeValue=@AttributeValue and ObjectTypeCode=@ObjectTypeCode return @value end
时间: 2024-10-09 02:19:38