Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vishal.gadhia@gmail.com
Starting Member
4 Posts |
Posted - 2009-01-05 : 17:20:57
|
Hi:I have a query in which I am using the PATINDEX function in the WHERE clause.This was working fine until, i installed the SQL SERVER 2005 Service Pack 3.Please let me know, if some one knows about this issue or is facing the same. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
vishal.gadhia@gmail.com
Starting Member
4 Posts |
Posted - 2009-01-05 : 19:00:35
|
SELECT card_guid, IsNull(first_name, ''), IsNull(last_name, ''), IsNull(company, ''), data FROM card WHERE file_id = @file_id AND PATINDEX(@search_pattern, data) > 0 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
vishal.gadhia@gmail.com
Starting Member
4 Posts |
Posted - 2009-01-06 : 10:36:50
|
ALTEr PROCEDURE [dbo].[usp_list_cards_by_search_string] @user_guid uniqueidentifier, @file_guid uniqueidentifier, @sort_tag1 nvarchar(255), @sort_tag2 nvarchar(255), @sort_tag3 nvarchar(255), @srch_str nvarchar(255)DECLARE @search_pattern nvarchar(255)SELECT @search_pattern = '%' + @srch_str + '%'SELECT card_guid, IsNull(first_name, ''), IsNull(last_name, ''), IsNull(company, ''), data FROM card WHERE file_id = @file_id AND PATINDEX(@search_pattern, data) > 0OUTPUT-: ALL THE ROWS THAT WHOSE PATINDEX() > 0 |
|
|
|
|
|
|
|