dbTalk Databases Forums  

Optimization

comp.databases comp.databases


Discuss Optimization in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
idol1975
 
Posts: n/a

Default Optimization - 08-06-2003 , 12:20 PM






Hi.
I am experiancing a problem with SQL Server 2000 store procedure.
The store procedure, which I am working on, supposed to fetch data
from one table, update data and insert updated data back to that
table.
My problem is that when fetch command gets executed, then every raw is
read. I want to make it work in such a way that only selected raws
must be read, but not all. How can I do it?

Reply With Quote
  #2  
Old   
--CELKO--
 
Posts: n/a

Default Re: Optimization - 08-06-2003 , 05:08 PM






Quote:
The stored procedure, which I am working on, supposed to fetch data
from one table, update data and insert updated data back to that
table. <<

Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in
your schema are. You ask people to help you for free, but you don't
give us any specifications we can use, no sample data, and no DDL.
Also it helps to see code if you have to debug it.

Why aren't you just using an UPDATE statement instead of a cursor with
a FETCH?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.