This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / 问高手同学2个数据库问题1. 有一个access 数据库,有一个栏位保存的图片文件,怎样把文件导出?(gif)
2. SQL server 2000, 有一个table的某个栏位原来只有3个可能值,后来增加了一个,有没有一个简单的办法搜索一下所有的存储过程/函数,哪一个test这个栏位的值并根据判断执行不同逻辑了?(所有这样的地方都需要改,否则逻辑不对)? SQL server 的全文搜索功能可以用于这个目的吗?
-worlddreamer31(where's your power?);
2007-10-4
{335}
(#3971001@0)
-
Hope the code is helpful.DECLARE @table VARCHAR(100)
DECLARE @field VARCHAR(100)
SELECT @table = '%' + YOUR_TABLE_NAME + '%'
SELECT @field = '%' + YOUR_FIELD_NAME + '%'
SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES
WHERE (ROUTINE_TYPE = 'FUNCTION' OR ROUTINE_TYPE = 'PROCEDURE')
AND ROUTINE_DEFINITION LIKE @table And ROUTINE_DEFINITION like @field
-deep_blue(BLUE);
2007-10-4
{353}
(#3971646@0)
-
非常感谢!
-worlddreamer31(Catch up);
2007-10-10
(#3984196@0)
-
栏位? very nice wording.... by the way 2) should not happen at all. bad DB design. every time there is a new value you have to go through this? ridiculous. add another table storing possible values instead.
-win(秋天的菠菜);
2007-10-4
(#3971666@0)
-
This is normal. We sometimes hard code some logic with some specific values. What you are talking about is a lookup options table, which is a minor issue.
-newkid(newkid);
2007-10-11
(#3984542@0)