开发者

Finding T-SQL code with literal strings for localization project

Does anyone have experience with tools/techniques that 开发者_运维百科would help identify T-SQL code with literal strings (that may require language translation for a localization project)? Would love to leverage another's experience that may save me time developing my own tool or - god forbid - doing it manually.


Just an idea, but you could do something like this:

SELECT
    OBJECT_NAME(id),
    [text]
FROM
    syscomments
WHERE id IN (
    SELECT id
    FROM syscomments 
    WHERE [text] LIKE '%''%''%' 
    AND OBJECTPROPERTY(id, 'IsProcedure') = 1 
    GROUP BY id
)

That will show every procedure with a constant string literal in it.

Of course, if you use too many dynamic SQL execution statements, you'll get a lot of false positives...

Hope it helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜