Re: Passing in multiple values to one parameter
From: Ace (Ace_at_discussions.microsoft.com)
Date: 09/14/04
- Next message: Sridhar K: "Problem in using trigger"
- Previous message: Vincent: "Re: sql statement"
- In reply to: Andrew J. Kelly: "Re: Passing in multiple values to one parameter"
- Next in thread: David G.: "Re: Passing in multiple values to one parameter"
- Reply: David G.: "Re: Passing in multiple values to one parameter"
- Reply: Steve Kass: "Re: Passing in multiple values to one parameter"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 13 Sep 2004 21:49:04 -0700
None of the following links seem to exist.
Thanx,
SK
"Andrew J. Kelly" wrote:
> Have a look here:
>
>
>
> http://www.algonet.se/~sommar/dynamic_sql.html Dynamic SQL
> http://www.users.drew.edu/skass/sql/ListToTableProc.sql.txt List to
> Table script
> http://www.aspfaq.com/show.asp?id=2248 Arrays & Lists
>
> --
> Andrew J. Kelly SQL MVP
>
>
> "Ace" <Ace@discussions.microsoft.com> wrote in message
> news:C4EEE342-ADDF-43F5-AE9E-A5811C822A47@microsoft.com...
> > Hello,
> >
> > I have a sproc declared like this.
> >
> > CREATE PROCEDURE [dbo].[GetMyResult]
> > @Param1 varchar(50)=null
> > AS...
> >
> > SELECT * FROM TABLE1
> > WHERE Col1 IN (@Param1)
> >
> > As you can see above, I need to select result set filtered based on values
> > passed in.
> >
> > First, is it how I should do?
> > Secondly, how can I call this sproc? Suppose I would like to return
> record
> > set which has Col1 value of either 98 or 99. How can I construct a
> calling
> > statement?
> >
> > EXEC GetMyResult @Param1='98,99'
> >
> > Then I get the following error.
> > "Syntax error converting the varchar value '98,99' to a column of data
> type
> > int."
> >
> > Please help!
> > Thanx,
> >
> >
>
>
>
- Next message: Sridhar K: "Problem in using trigger"
- Previous message: Vincent: "Re: sql statement"
- In reply to: Andrew J. Kelly: "Re: Passing in multiple values to one parameter"
- Next in thread: David G.: "Re: Passing in multiple values to one parameter"
- Reply: David G.: "Re: Passing in multiple values to one parameter"
- Reply: Steve Kass: "Re: Passing in multiple values to one parameter"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|