修改备注字段长度,查询系统后台字段长度。
示例为修改采购订单和采购申请单的分录字段长度为1000
```sql
ALTER TABLE T_PUR_ReqEntry ALTER COLUMN FENTRYNOTE NVARCHAR(1000)
ALTER TABLE t_PUR_POOrderEntry ALTER COLUMN FNOTE NVARCHAR(1000)
```
修改完之后可以通过以下SQL进行查询
```sql
--查询表的属性信息
SELECT
C.name as [字段名],T.name as [字段类型]
,convert(bit,C.IsNullable) as [可否为空]
,convert(bit,case when exists(SELECT 1 FROM sysobjects where xtype='PK' and parent_obj=c.id and name in (
SELECT name FROM sysindexes WHERE indid in(
SELECT indid FROM sysindexkeys WHERE id = c.id AND colid=c.colid))) then 1 else 0 end)
as [是否主键]
,convert(bit,COLUMNPROPERTY(c.id,c.name,'IsIdentity')) as [自动增长]
,C.Length as [占用字节]
,COLUMNPROPERTY(C.id,C.name,'PRECISION') as [长度]
,isnull(COLUMNPROPERTY(c.id,c.name,'Scale'),0) as [小数位数]
,ISNULL(CM.text,'') as [默认值]
,isnull(ETP.value,'') AS [字段描述]
--,ROW_NUMBER() OVER (ORDER BY C.name) AS [Row]
FROM syscolumns C
INNER JOIN systypes T ON C.xusertype = T.xusertype
left JOIN sys.extended_properties ETP ON ETP.major_id = c.id AND ETP.minor_id = C.colid AND ETP.name ='MS_Description'
left join syscomments CM on C.cdefault=CM.id
WHERE C.id = object_id('t_PUR_POOrderEntry') AND c.name = 'FNOTE'
```
修改完成后去前段录单子发现还是被系统控制,这个时候要去BOS中修改字段的长度。
![image.webp](/download/010067f94226e7f845c0a82c56a043f92a72.webp)
修改保存后就完成了字段的修改。
修改备注字段长度,查询系统后台字段长度。
示例为修改采购订单和采购申请单的分录字段长度为1000```sqlALTER TABLE T_PUR_ReqEntry ALTER COLUMN FENTRYNOTE NVARCHAR(1000)ALT...
点击下载文档
本文2024-09-16 17:17:56发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-14806.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章