I was really surprise and woundering where the Object search window is. Out of frustration I look into Google, not for objects but to know where the Object search window is gone. Then came up with the anwers that Object search functionality is taken out of SQL 2005 tool set. After all this research decided to write my query to do the task, and here is the T-SQL query solution for the problem
/**
SELECT name[ObjectName],
CASE xtype
WHEN 'C' THEN 'CHECK constraint'
WHEN 'D' THEN 'Default or DEFAULT constraint'
WHEN 'F' THEN 'FOREIGN KEY constraint'
WHEN 'L' THEN 'Log'
WHEN 'FN' THEN 'Scalar function'
WHEN 'IF' THEN 'Inlined table-function'
WHEN 'P' THEN 'Stored procedure'
WHEN 'PK' THEN 'PRIMARY KEY constraint (type is K)'
WHEN 'RF' THEN 'Replication filter stored procedure'
WHEN 'S' THEN 'System table'
WHEN 'TF' THEN 'Table function'
WHEN 'TR' THEN 'Trigger'
WHEN 'U' THEN 'User table'
WHEN 'UQ' THEN 'UNIQUE constraint (type is K)'
WHEN 'V' THEN 'View'
WHEN 'X' THEN 'Extended stored procedure'
END as ObjectType
FROM sysobjects WHERE NAME LIKE '%customer%'
UNION ALL
SELECT object_name(id)+' >> '+name, 'column' FROM syscolumns WHERE NAME LIKE '%customer%'
**/
Here is how the output looks like
No comments:
Post a Comment