database-cursor Questions
7
Solved
I want to use a database cursor; first I need to understand what its use and syntax are, and in which scenario we can use this in stored procedures? Are there different syntaxes for different versi...
Sciuroid asked 19/11, 2010 at 7:8
5
Solved
I am writing a cursor to populate data in new table from main table which contains data in below manner
Item
Colors
Shirt
Red,Blue,Green,Yellow
I want to populate new Table data by fetc...
Cortisone asked 24/11, 2010 at 12:49
3
Solved
I am using dynamic cursor for fetching data. Query that is being executed looks similar to:
query := 'SELECT column1, column2
FROM my_table
WHERE column1 LIKE ''%:bv1%''';
And the cursor its...
Liverwort asked 22/5, 2017 at 12:48
5
Solved
As in the topic. Can I simply reset cursor's position to the beginning in Transact-SQL, so it can run again over the table? I want to reset it in the following context:
DECLARE @userID INT
DECLARE...
Disvalue asked 26/6, 2013 at 10:34
3
Solved
I don't understand using cursor in version 9! Do you need cursor?
In below example after call function in console line get:
<openerp.sql_db.Cursor object at 0x7f94f4c0b0d0>
@api.multi
de...
Bacchae asked 13/2, 2017 at 10:29
2
Solved
i wrote a python program like this that should run in multithreading mode:
def Func(host,cursor,db):
cursor.execute('''SELECT If_index, Username, Version, Community, Ip_traff FROM HOST WHERE
Ho...
Runty asked 29/10, 2014 at 11:23
5
Solved
I'd like to know your experience(s) with replacing SQL Server cursors in existing code, or how you took a problem that a procedural guy would use a cursor to solve, and did it set-based.
What was ...
Kerek asked 8/6, 2009 at 21:10
4
Solved
I am newbie in Python Flask. In my project we are creating db object using below code.
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
db = SQLAlchemy(...
Cumbersome asked 12/4, 2018 at 13:25
5
Solved
I get this error:
TypeError: object of type 'Cursor' has no len()
when I try to execute:
reply = db['test'].find({"date":{"$gt":date_query}} ,{"date":1,"route_id":1,"loc":1,"_id":0})
length ...
Pomerania asked 24/4, 2013 at 23:41
2
In which case do we need to use for update nowait in cursors.
Pullet asked 6/11, 2012 at 9:39
2
I have a cursor created using the WITH HOLD option that allows the cursor to be used for subsequent transactions.
I would like to retrieve the number of rows that can be fetched by the cursor. Sinc...
Braasch asked 23/2, 2021 at 13:56
2
Solved
In search for the right type hint for a sqlalchemy cursor of a sqlalchemy query, here is an example function:
import sqlalchemy
from typing import Tuple, tuple
def get_cursor_and_records(
connect...
Finicking asked 19/5, 2022 at 17:21
5
Solved
How can I fetch from a ref cursor that is returned from a stored procedure (OUT variable) and print the resulting rows to STDOUT in SQL*PLUS?
ORACLE stored procedure:
PROCEDURE GetGrantListByPI(p...
Squamation asked 28/4, 2011 at 16:55
3
Solved
I am trying to write a stored procedure in MySQL which will perform a somewhat simple select query, and then loop over the results in order to decide whether to perform additional queries, data tra...
Moffitt asked 16/11, 2009 at 22:9
8
Solved
What is the query to find the number of current open cursors in an Oracle Instance?
Also, what is the accuracy/update frequency of this data?
I am using Oracle 10gR2
Troche asked 18/6, 2009 at 5:25
8
Solved
I would like to know what is the difference between laravel chunk and laravel cursor method. Which method is more suitable to use? What will be the use cases for both of them? I know that you shoul...
Farnham asked 2/8, 2017 at 15:12
3
Solved
I have to iterate each row in my table User in MySQL.
I need to create a new row Address for each iteration in User with some conditions described below.
I have 3 tables:
User: id, stuff, id_per...
Mraz asked 12/3, 2018 at 16:17
4
Solved
I've created a ListView populated by the data returned from a query.
It works, but in the LogCat I've got the message:
Cursor Window: Window is full: requested allocation 444 bytes, free space 363...
Central asked 20/11, 2013 at 11:16
2
Solved
I have 2 tables- student and studLoad both having 2 fields studID and studName. I want to load data from student table into stuLoad table.
If the data already exists in the studLoad table, then it ...
Memberg asked 12/8, 2012 at 11:43
12
Solved
I would like to find the number of rows in a cursor. Is there a keyword that can help? Using COUNT, we have to write a query. Any help will be greatly appreciated.
Tidewaiter asked 8/2, 2011 at 14:17
6
Solved
I need to create a new field sid on each document in a collection of about 500K documents. Each sid is unique and based on that record's existing roundedDate and stream fields.
I'm doing so with t...
Rutabaga asked 29/5, 2017 at 17:52
6
Solved
We are troubled by eventually occurring cursor not found exceptions for some Morphia Queries asList and I've found a hint on SO, that this might be quite memory consumptive.
Now I'd like to know a...
Sclerosed asked 21/4, 2016 at 10:34
4
Solved
Situation
I wrote a query:
var results = db.collection('diseases').find({
'ttl.txt': {
$regex: data,
$options: 'i'
}
}).toArray();
Problem
Then I printed results to a console.
if (results...
Rhinoplasty asked 19/7, 2017 at 18:21
2
Solved
Is there any benefit to closing a cursor when using Python's sqlite3 module? Or is it just an artifact of the DB API v2.0 that might only do something useful for other databases?
It makes sense tha...
Strepphon asked 12/5, 2017 at 1:6
10
Solved
How do I serialize pyodbc cursor output (from .fetchone, .fetchmany or .fetchall) as a Python dictionary?
I'm using bottlepy and need to return dict so it can return it as JSON.
Syringe asked 13/5, 2013 at 10:2
1 Next >
© 2022 - 2025 — McMap. All rights reserved.