whateveragain
Programmer
What is wrong with this code? I'm passing in a string of states separated by a space. This works if I only pass in one state. It doesn't work if I pass in several states separated with a space. I was trying to avoid parsing @PSelstate. Thanks
ALTER procedure [dbo].[update_subcnty]
-- Add the parameters for the stored procedure here
@PSelstate char(400)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT *
into subcnty
FROM County
where County.state IN (@PSelstate)
ORDER BY County.State, County.County ;
END
ALTER procedure [dbo].[update_subcnty]
-- Add the parameters for the stored procedure here
@PSelstate char(400)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT *
into subcnty
FROM County
where County.state IN (@PSelstate)
ORDER BY County.State, County.County ;
END