Friday, March 23, 2012

how to test a stored procedure in a sql query analyzer?

Hi,
How do we test a stored procedure in SQL Query Analyzer?
Thanks for hlep.
JasonYou execute stored procedures in T-SQL with the execute
<http://msdn.microsoft.com/library/e..._ea-ez_05ro.asp>
statement. For example,
exec dbo.MyProc MyInputParam1, MyInputParam2, MyOutputParam OUT
*mike hodgson*
blog: http://sqlnerd.blogspot.com
Jason Huang wrote:

>Hi,
>How do we test a stored procedure in SQL Query Analyzer?
>Thanks for hlep.
>
>Jason
>
>|||You can also just open Query Analyzer - write the sp name and press the
green arrow execute button
Jack Vamvas
________________________________________
__________________________
SQL Server db administration - check www.ciquery.com/remotedba.htm
SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
"Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
news:%238DlKHQ4FHA.2552@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How do we test a stored procedure in SQL Query Analyzer?
> Thanks for hlep.
>
> Jason
>|||How about the "Ten Most Expensive Products" in Northwind?
I exec Ten Most Expensive Products, and it kept giving me an error message
saying some where wrong near Expensive.
"neu" <info@.nospam.com> glsD:dkeun3$nqk$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...[
vbcol=seagreen]
> You can also just open Query Analyzer - write the sp name and press the
> green arrow execute button
> Jack Vamvas
> ________________________________________
__________________________
> SQL Server db administration - check www.ciquery.com/remotedba.htm
> SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
> "Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
> news:%238DlKHQ4FHA.2552@.TK2MSFTNGP10.phx.gbl...
>[/vbcol]|||EXEC "Ten Most Expensive Products"
or
EXEC [Ten Most Expensive Products]
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
news:eY1S9zQ4FHA.2432@.TK2MSFTNGP10.phx.gbl...
> How about the "Ten Most Expensive Products" in Northwind?
> I exec Ten Most Expensive Products, and it kept giving me an error message
saying some where wrong
> near Expensive.
>
> "neu" <info@.nospam.com> glsD:dkeun3$nqk$1@.nwrdmz01.dmz.ncs.ea.ib
s-infra.bt.com...
>|||Thanks Tibor.
This works!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> glsD:%23uUJ5$Q4
FHA.1184@.TK2MSFTNGP12.phx.gbl...
> EXEC "Ten Most Expensive Products"
> or
> EXEC [Ten Most Expensive Products]
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
> news:eY1S9zQ4FHA.2432@.TK2MSFTNGP10.phx.gbl...
>|||Bartender, make the next one a double!
J.
On Fri, 4 Nov 2005 15:35:24 +0800, "Jason Huang"
<JasonHuang8888@.hotmail.com> wrote:

>Thanks Tibor.
>This works!
>"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> gl
sD:%23uUJ5$Q4FHA.1184@.TK2MSFTNGP12.phx.gbl...
>

No comments:

Post a Comment