Discuss Create Stored Procedure in the SQL Development forum on ASP Free. Create Stored Procedure SQL forums discussing structured query language related questions that are platform independent. Discussions include advanced topics such as joins, stored procedures, and triggers.
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
Posts: 385
Time spent in forums: 4 Days 52 m 27 sec
Reputation Power: 16
Create Stored Procedure
Hello,
How do you create a Stored Procedure from an inline statement?
from Database which works fine CREATE PROCEDURE dbo.spTable
AS
SELECT STR(MONTH(bsdate)) AS Date
FROM Table2
GROUP BY STR(MONTH(bsdate))
ORDER BY STR(MONTH(bsdate)) DESC
RETURN
from inline-statement which doesn't work Dim newSP as string = "CREATE PROCEDURE dbo.spTable AS SELECT STR(MONTH(bsdate)) AS Date FROM Table2 GROUP BY STR(MONTH(bsdate)) ORDER BY STR(MONTH(bsdate)) DESC RETURN"
string sStr = "CREATE PROCEDURE dbo.spTable AS SELECT STR(MONTH(bsdate)) AS Date FROM Table2 GROUP BY STR(MONTH(bsdate)) ORDER BY STR(MONTH(bsdate)) DESC RETURN";
//SQL Command...
SqlCommand sCmd = new SqlCommand(sStr, CN);
//Execute Command.
sCmd.Connection.Open();
sCmd.ExecuteNonQuery();
sCmd.Connection.Close();
Have you tried anything like this already?
__________________ Slarentice(origin:Shadow Wizard of ASP Free) [noun] A slave and apprentice of the Wizard's Circle (specifically of mehere) at ASP Free.
----
If shemzilla takes over, it's best to be on his good side
Accelerating Trading Partner Performance One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.
Competing on Analytics This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.
Cost Effective Scaling with Virtualization and Coyote Point Systems An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.
Five Checkpoints to Implementing IP Telephony Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.
Hosted Email Security: Staying Ahead of New Threats In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.