The variable name should not enclosed within the single quote.
It should be like this:

CREATE PROCEDURE dbo.spSupplyInformation
 @SearchKeyword varchar (100) 
 AS
 SELECT 
 site_id,usage_code,item_id,item_descp,commodity_code,unit_of_measure,
stockroom_id,bin_id,on_hand_qty,minimum_qty,maximum_qty,reorder_qty
 FROM
dbo.tbl_Elec_Req
WHERE 
item_descp like  @SearchKeyword + '%'

 GO


Cheers,

CT Loo
====================
Fifthnet Technology Sdn Bhd
www.5thnet.com
====================
----- Original Message ----- 
From: "Bosky, Dave" <[EMAIL PROTECTED]>
To: "SQL" <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 10:16 PM
Subject: T-SQL Stored Procedure like syntax


> I'm trying to use a basic search but it never returns matching records.
>  
> I know I must be missing something simple but I'm new to using SP's.
> ----------------
> CREATE PROCEDURE dbo.spSupplyInformation
> @SearchKeyword varchar (100) 
> AS
> SELECT 
>  
> site_id,usage_code,item_id,item_descp,commodity_code,unit_of_measure,
>  
> stockroom_id,bin_id,on_hand_qty,minimum_qty,maximum_qty,reorder_qty
>             FROM
>             dbo.tbl_Elec_Req
>             WHERE 
>             item_descp like  '@SearchKeyword%'
> GO
> ---------------
> Thanks,
> Dave
>  
>  
> 
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to