Cool. Thanks! I searched everywhere to find an example but no luck. Can you recommend any good sql reference sites?
Thanks, Dave Bosky -----Original Message----- From: CT, Loo [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 10:33 AM To: SQL Subject: Re: T-SQL Stored Procedure like syntax 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 > > > > ______________________________________________________________________ Macromedia ColdFusion 5 Training from the Source Step by Step ColdFusion http://www.amazon.com/exec/obidos/ASIN/0201758474/houseoffusion Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
