I have created a stored procedure that searches a database. It always
returns a emtpy record set when i run it..I know that the data existes in
my table yet it doesnt return anything.. I am simply running the procedure
inside SQL, enter a keyword i know is in there, and get nothing.. here is
the procedure
Procedure simpleseach
(
@keywords nvarchar(999)
)
As
Begin
set nocount on
--create temporary table
create table tabpagedmodesearch
(
id int identity,
itemid int null,
hotitem nvarchar(10) null,
haslink nvarchar(255) null,
haspic nvarchar(255) null,
title nvarchar(100) null,
maxbid int null,
numberbids int null,
enddate nvarchar(255) null,
bold nvarchar(10) null,
highlight nvarchar(10) null,
catfeatured nvarchar(10) null,
homefeatured nvarchar(10) null,
)
--populate temporary table with data that meets keyword critieria
insert into tabpagedmodesearch(itemid, hotitem, haslink, haspic, title,
maxbid, numberbids, enddate, bold, highlight, catfeatured, homefeatured)
select id, hotitem, haslink, haspic, title, maxbid, numberbids, enddate,
bold, highlight, catfeatured, homefeatured
from items
where title like '%"&@keywords&"%'
drop table tabpagedmodesearch
set nocount off
return
end
I dont know what is going on or why it doesnt return records. Thanks for
the help Brad....