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 Tuesday, July 16, 2013 5:26 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, November 18, 2013 5:51 PM
Points: 2, Visits: 12
The procedure does not search primary key content.
Post #1474340
Posted Tuesday, July 16, 2013 5:33 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 9:26 AM
Points: 341, Visits: 682
Yes it does:

USE tempdb

CREATE TABLE test (somevarchar VARCHAR (100) PRIMARY KEY CLUSTERED)

INSERT INTO test VALUES ('does it seach PK')

EXEC "database the proc is in".dbo.usp_String_Search

@v_Search_String = 'does it seach PK'
,@v_Database_Name = 'tempdb'
Post #1474341
Posted Tuesday, July 16, 2013 6:12 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, November 18, 2013 5:51 PM
Points: 2, Visits: 12
I re-created the stored procedure and it is working now, but I cannot get it working with INT.

USE tempdb

CREATE TABLE test (LoanNum VARCHAR (10) PRIMARY KEY CLUSTERED, OfficeID INT )

INSERT INTO test VALUES ('100001', 1)
INSERT INTO test VALUES ('100002', 2)
INSERT INTO test VALUES ('100003', 3)

EXEC DBAdmin.dbo.usp_String_Search
@v_Search_String = '2'
,@v_Database_Name = 'tempdb'
,@v_Data_Types = N'INT'

DROP TABLE TEST
Post #1474344
Posted Tuesday, July 16, 2013 8:16 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 9:26 AM
Points: 341, Visits: 682
As mentioned in the article it only checks against the following data types:

CHAR, NCHAR, NTEXT, NVARCHAR, TEXT, VARCHAR, and XML
Post #1474351
Posted Thursday, November 28, 2013 7:55 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 2:10 AM
Points: 16, Visits: 30
Thanks a million.

I have one that search only one data type, but I could search for a list of values. This one will fill the gap for me.
Post #1518363
Posted Thursday, November 28, 2013 8:00 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 9:26 AM
Points: 341, Visits: 682
Glad you like it. :)
Post #1518365
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse