SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Search for String in all columns


Search for String in all columns

Author
Message
whenriksen
whenriksen
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2407 Visits: 693
Comments posted to this topic are about the item Search for String in all columns

Wes
(A solid design is always preferable to a creative workaround)
mike.sortino
mike.sortino
SSC-Enthusiastic
SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)

Group: General Forum Members
Points: 133 Visits: 33
This could prove very useful -- thank you :-)
whenriksen
whenriksen
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2407 Visits: 693
Glad to hear it.

I've already made a few minor revisions to it that I'll try to post a bit later when I have some time.

Wes

Wes
(A solid design is always preferable to a creative workaround)
whenriksen
whenriksen
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2407 Visits: 693
--*********************************
--Show progress on the message tab
--*********************************
PRINT @SQL
PRINT 'Column ' + CAST(@LoopNo AS NVARCHAR(5)) + ': ' +@Schema + '.' + @Table + '.' + @Column + ' @ ' + CONVERT(VARCHAR(12),CURRENT_TIMESTAMP,114)



When trying to backport the code to SQL 2005, I messed up the progress message, causing it to show the date instead of the time. Replace the progress block with the lines pasted above. This does not affect the functionality of the code in any way. I just found it useful to know the time and duration a table was searched.

Sample message tab output:
SELECT [TechnologyName] FROM [dim].[Technology] where charINDEX('Approved',[TechnologyName]) > 0
Column 3: dim.Technology.TechnologyName @ 16:08:56:573


The message tab includes the select statement used for the search so you can copy it and run it manually if you need to.

Wes
(A solid design is always preferable to a creative workaround)
Iwas Bornready
Iwas Bornready
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: General Forum Members
Points: 36334 Visits: 886
Thanks for the script.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search