Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Updates in stored procedure Expand / Collapse
Author
Message
Posted Friday, June 27, 2014 9:18 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 9:52 AM
Points: 26, Visits: 103
Hi,
I have a table 'ABC' and a stored procedure which updates 'ABC'. I update the table 'ABC' every week some times monthly. So i have a task that the stored procedure need to update whenever new records comes in ..instead of updating complete table.
Post #1586925
Posted Friday, June 27, 2014 10:04 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:56 PM
Points: 13,081, Visits: 12,545
susmitha117 (6/27/2014)
Hi,
I have a table 'ABC' and a stored procedure which updates 'ABC'. I update the table 'ABC' every week some times monthly. So i have a task that the stored procedure need to update whenever new records comes in ..instead of updating complete table.


Add a where clause to your update statement.

If you need more details than that we will need a few things:

1. Sample DDL in the form of CREATE TABLE statements
2. Sample data in the form of INSERT INTO statements
3. Expected results based on the sample data

Please take a few minutes and read the first article in my signature for best practices when posting questions.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1586943
Posted Tuesday, September 2, 2014 4:43 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, September 4, 2014 12:10 AM
Points: 18, Visits: 162
you might need to convert the stored procedure to trigger
Post #1609546
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse