Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: need help with stored procedure


Message #1 by "Michael Goldman" <mg188@h...> on Fri, 19 Jan 2001 09:01:56 -0800
Thanks, Igor.  I'll try it.
----- Original Message -----
From: "Igor Braginsky" <anhel11@y...>
To: "sql language" <sql_language@p...>
Sent: Friday, January 19, 2001 9:56 AM
Subject: [sql_language] Re: need help with stored procedure


> You can write like this
>
> create procedure sp_MyTest
>
> @test1 varchar(255),
> @test2 varchar(255)
>
>
> as
>
> > SELECT tblstuff.thingID
> > FROM tblstuff
> > WHERE tblstuff.thingName in (@test1, @test2)
>
> Call the store procedure in your code and put your
> parameters like this
>
> strSQL = "execute MyProc '" & test1 & "', '" & test2 &
> "'"
>
> set rs = db.Execute(strSQL)
>
> Igor
>
>
>
>
>
>
>
> --- Michael Goldman <mg188@h...> wrote:
> > Here's a sql that works ok when I put it inline in
> > my web page.  It works
> > whether the parameters are ('test', 'test1') or
> > ('test', 'test1', 'test2')
> > or any other number of parameters.  How can I make
> > this work as a stored
> > procedure?  I'm using Access 97 but will convert to
> > Sql Server when I put
> > the site up on a webhost.
> >
> > SELECT tblstuff.thingID
> > FROM tblstuff
> > WHERE ((tblstuff.thingName in ('test', 'test1'));
> >
> > Your help would be greatly appreciated.
> >
> > Mike
> >
> >
> 

  Return to Index