Create Stored Procedure for SQL Script

Posted on 2009-04-20
Last Modified: 2012-05-06
I want to create a stored procedure to execute the following script:

UPDATE somast
set fcusrchr1 = fsono

Then I can use the stored procedure to create a SQL Agent job and schedule this to run automatically.

I think I can build the Agent job...just not sure how to create the stored procedure.

Question by:glennes
    LVL 6

    Accepted Solution

    You can enter that command straight into the SQL job if you want to (just make sure to select the right database in the job).
    LVL 11

    Expert Comment

    by:N R
    Go to the highlighted below, right click and new stored procedure:

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    get row count per each table 2 43
    SQL - sum months, quarter, YTD 9 70
    Sql query 12 56
    How to enforce inte 8 27
    Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
    Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now