Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

String Search Expand / Collapse
Author
Message
Posted Saturday, April 7, 2012 11:48 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, September 25, 2014 7:05 AM
Points: 347, Visits: 702
Comments posted to this topic are about the item String Search
Post #1279857
Posted Monday, April 9, 2012 6:56 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 9, 2012 7:26 PM
Points: 12, Visits: 19
very very good.

--The confidence is a premise, the courage is a motive, the perseverance is assurance!
http://www.cnblogs.com/huyong/
Post #1280546
Posted Monday, April 9, 2012 7:25 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, September 25, 2014 7:05 AM
Points: 347, Visits: 702
Thank you. I hope you find it useful. :)
Post #1280554
Posted Monday, April 9, 2012 7:27 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 9, 2012 7:26 PM
Points: 12, Visits: 19
no problem.

--The confidence is a premise, the courage is a motive, the perseverance is assurance!
http://www.cnblogs.com/huyong/
Post #1280555
Posted Tuesday, April 17, 2012 7:35 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, August 29, 2012 3:50 AM
Points: 10, Visits: 34
Hello any one can help me on. i want to search particular one table.
Post #1284917
Posted Tuesday, April 17, 2012 10:12 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, September 25, 2014 7:05 AM
Points: 347, Visits: 702
You can modify the code temporarily by adding at line 232:

AND O.name = 'MY_TABLE_NAME'

So something like this:

FROM
'+@v_Database_Name+N'.[sys].[schemas] S
INNER JOIN '+@v_Database_Name+N'.[sys].[objects] O ON O.[schema_id] = S.[schema_id]
AND O.[type] IN ('+(CASE
WHEN @v_Object_Types IS NOT NULL THEN @v_Object_Types
ELSE N'''U'', ''V'''
END)+N')
AND O.name = ''MY_TABLE_NAME''
INNER JOIN '+@v_Database_Name+N'.[sys].[columns] C ON C.[object_id] = O.[object_id]
Post #1285079
Posted Wednesday, April 18, 2012 4:40 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, August 29, 2012 3:50 AM
Points: 10, Visits: 34
Thanks for help me..

my table name contain schema name like 'abc.tablename'

when i add table name in my procedure it execute successfully after that run that procedure it's give me error
Invalid column name 'abc.tablename'.
please help me on..
can u send me Change procedure..
-----------

Post #1285533
Posted Wednesday, April 18, 2012 5:34 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, September 25, 2014 7:05 AM
Points: 347, Visits: 702
If you need to include the schema, then something like this should do the trick:

FROM
'+@v_Database_Name+N'.[sys].[schemas] S
INNER JOIN '+@v_Database_Name+N'.[sys].[objects] O ON O.[schema_id] = S.[schema_id]
AND O.[type] IN ('+(CASE
WHEN @v_Object_Types IS NOT NULL THEN @v_Object_Types
ELSE N'''U'', ''V'''
END)+N')
AND O.name = ''MY_TABLE_NAME''
AND S.name = ''MY_SCHEMA_NAME''

INNER JOIN '+@v_Database_Name+N'.[sys].[columns] C ON C.[object_id] = O.[object_id]
Post #1285554
Posted Monday, July 2, 2012 1:17 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 6, 2014 8:32 AM
Points: 31, Visits: 247
nice little proc. thanks for sharing.
Post #1323991
Posted Monday, July 2, 2012 4:52 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, September 25, 2014 7:05 AM
Points: 347, Visits: 702
My pleasure. Hope you find it handy.
Post #1324074
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse