473,671 Members | 2,252 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cursor and fetch statement

11 New Member
can you please give me an example of using the FETCH and cursor statement

And make to be able to fetch more that one row at a time,

lets say the two database are TEST(fetch to) and TLC (fetch from) and both have Table called Mine with same fields
Sep 6 '07 #1
2 1620
Purple
404 Recognized Expert Contributor
Sally,

I have moved your post into the forum from the MSSQL articles

MODERATOR
Sep 6 '07 #2
ck9663
2,878 Recognized Expert Specialist
can you please give me an example of using the FETCH and cursor statement

And make to be able to fetch more that one row at a time,

lets say the two database are TEST(fetch to) and TLC (fetch from) and both have Table called Mine with same fields

would you mind giving a more detailed specs? maybe FETCH is not the right solution
Sep 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1551
by: GAS | last post by:
I have tried to figure this out for a couple of days now and I'm not making much headway. I have a cursor that I can't get to work properly. There are two cursors in the stored procedure. The first accesses data in the current database and works fine. The second accesses data in another database on the same server. Whenever I fetch rows into the second cursor (other database) the variables I fetch into remain NULL. I have included...
7
2223
by: Philip Mette | last post by:
Does anyone have any good references they could recommend on Cursor based SQL writing? I have to create SQL that can loop though records simular to VB loops and I have been told that this is the way to go. Any recommendations would be helpful.
15
3819
by: Philip Mette | last post by:
I am begginner at best so I hope someone that is better can help. I have a stored procedure that updates a view that I wrote using 2 cursors.(Kind of a Inner Loop) I wrote it this way Because I couldn't do it using reqular transact SQL. The problem is that this procedure is taking longer and longer to run. Up to 5 hours now! It is anaylizing about 30,000 records. I think partly because we add new records every month. The procedure...
3
1313
by: Jimbo | last post by:
I have a cursor here that appears to never stop running even though the record set that populates it is only 22 records heres the code: declare cursorfinal cursor for select appointmenteffdate, appointmentDuration, provideroid from @main open cursorfinal
2
9491
by: ansonee | last post by:
I wrote a stored procedure that contains some COMMIT logic, but keep runnign into an odd problem. As soon as the procedure gets to the COMMIT statement, the CURSOR closes. Here's the procedure: CREATE PROCEDURE AIM.UPDATEARCHIVERETRIEVALSTATUS ( ) SPECIFIC AIM.UPDATEARCRETSTS LANGUAGE SQL P1: BEGIN DECLARE RECORDCOUNT INTEGER;
12
31001
by: Lucky | last post by:
Hi guys! i want to create one cursor in the t-sql. the problem is i want to use stored procedure instead of select command in cursor. can anyone tell me how can i use stored procedure's o/p to create cursor? i'm using sql 2000 and .net 2.0 thanks,
2
23117
by: Chris Zopers | last post by:
Hello, I've created a stored procedure that loops through a cursor, with the following example code: DECLARE curPeriod CURSOR LOCAL for SELECT * FROM tblPeriods DECLARE @intYear smallint DECLARE @intPeriod smallint DECLARE @strTekst varchar(50)
10
3252
by: 4.spam | last post by:
Hello. v8.2.7, windows xp. --- create procedure cursor_test() language sql dynamic result sets 1 begin declare c1 cursor
0
18025
debasisdas
by: debasisdas | last post by:
RESTRICTIONS ON CURSOR VARIABLES ================================= Currently, cursor variables are subject to the following restrictions: Cannot declare cursor variables in a package spec. CREATE PACKAGE emp_stuff AS TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE; emp_cv EmpCurTyp; -- not allowed END emp_stuff;
0
1568
by: ajexpert | last post by:
Ok, here it is I need define a cursor having select statement with dynamic where clause. Please let me know if the query is not clear. I belive what I am asking is not the Rocket Science. I need to construct SELECT STATEMENT on the FLY and process the same in CURSOR.
0
8476
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8598
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7437
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4407
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2812
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.