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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 select statements as parameters in sproc

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-06 : 17:12:19
Howard writes "I have a search script that calls a sproc with the WHERE clause as a parameter. In the sproc a temp table is filled with the results of the search using the statement:

INSERT INTO #TempItems (title)
select title from equipment where @parameter
I keep getting syntax errors when @parameter=title like '%screw%'

@parameter can be very long depending on how the user is searching (using AND or OR).

Is what I'm trying to do even possible?

Thanks
Howard"
   

- Advertisement -