"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Thursday, June 24, 2010

Search a string in a table

 Hi friends,
In my last post i shown how to search a string in database 2day i'm showing how to search a string in a table


 CREATE PROCEDURE uspSearchWord @searchstring VARCHAR(100) AS
SELECT * FROM mst_country
 WHERE
    strcountry LIKE '%'+ @searchstring + '%'
    OR
    strstatus LIKE '%'+ @searchstring+'%'
ORDER BY id


where

uspSearchWord  is my Store procedure Name
searchstring is word to search
mst_country Table Name
strcountry,strstatus



Have a nice day... 'N happy Coding :)

 Standard Procedure Face Mask, Cellulose, Blue, 50 per BoxCriminal Procedure for the Criminal Justice ProfessionalTest Procedures for Short Term Thermal Stores

No comments: