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.
JasonThis is a multi-part message in MIME format.
--050700040106020402020601
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
You execute stored procedures in T-SQL with the execute
<http://msdn.microsoft.com/library/en-us/tsqlref/ts_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
>
>
--050700040106020402020601
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>You execute stored procedures in T-SQL with the <a
href="http://links.10026.com/?link=execute</a>">http://msdn.microsoft.com/library/en-us/tsqlref/ts_ea-ez_05ro.asp">execute</a>
statement. For example,<br>
</tt>
<blockquote><tt>exec dbo.MyProc MyInputParam1, MyInputParam2,
MyOutputParam OUT</tt><br>
</blockquote>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2">blog:</font><font face="Tahoma" size="2"> <a
href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
Jason Huang wrote:
<blockquote cite="mid%238DlKHQ4FHA.2552@.TK2MSFTNGP10.phx.gbl"
type="cite">
<pre wrap="">Hi,
How do we test a stored procedure in SQL Query Analyzer?
Thanks for hlep.
Jason
</pre>
</blockquote>
</body>
</html>
--050700040106020402020601--|||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> ¼¶¼g©ó¶l¥ó·s»D:dkeun3$nqk$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
> 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
>>
>|||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> ¼¶¼g©ó¶l¥ó·s»D:dkeun3$nqk$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>> 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
>>
>>
>|||Thanks Tibor.
This works!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> ¼¶¼g©ó¶l¥ó·s»D:%23uUJ5$Q4FHA.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...
>> 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> ¼¶¼g©ó¶l¥ó·s»D:dkeun3$nqk$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>> 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
>>
>>
>>
>|||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> ¼¶¼g©ó¶l¥ó·s»D:%23uUJ5$Q4FHA.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...
>> 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> ¼¶¼g©ó¶l¥ó·s»D:dkeun3$nqk$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>> 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
>>
>>
>>
>>
>

No comments:

Post a Comment