cursor

SQL - Replacing all “ASCII/special characters” in a string

孤者浪人 提交于 2019-12-08 08:30:38
问题 Edit: I have about 80 characters that are causing problems in my application so I don't want to hard code a REPLACE for every single character. I think it would be easier to create a separate table with two columns,"special characters" and "replacement characters", and I will remove those columns from the original table which contains the column "StringTest". My goal will be figuring out how to use the characters table to replace characters in the string table. I am trying to replace all

Basic syntax on FOR UPDATE cursor

纵然是瞬间 提交于 2019-12-08 08:14:25
问题 Ok, I'm certainly familiar with walking through a table using a read-only cursor, but I can't seem to find the right syntax for actually updating the current row (Neither the cursor page nor the UPDATE page in books online seems to show this simple operation): DECLARE @counter int; SET @counter = 1; DECLARE myCursor CURSOR FOR SELECT RowID, Value FROM myTable FOR UPDATE OF Value; OPEN myCursor; WHILE @counter < 100 FETCH NEXT FROM myCursor UPDATE myCursor SET Value = @Counter << DOESN'T WORK

Oracle - cursor using dbms_utility.exec_ddl_statement not executing properly

余生长醉 提交于 2019-12-08 07:33:01
问题 I have a requirement to run a SP across multiple DBs at the same time and one part of it is to eliminate some duplicate records from each DB. Now since the SP can be run multiple times i've included a backup table and and what's needed to truncate and drop it in case the SP is run twice in a row. Now, since i'm creating tables via DBLINK i've researched that i need to use dbms_utility.exec_ddl_statement - but in this case even though the procedure executes, the truncate and drop queries seem

How does Cursor work in android [closed]

心已入冬 提交于 2019-12-08 07:12:58
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I'm having a hard time exactly visualizing 'Cursor' functionality in my program. I kind of get the jist of it, but can anyone explain it's functionality in detail? By Cursor, I mean the Cursor interface. I can't simply understand the role it plays with anything. http://developer

WPF ListView Cursor Change

三世轮回 提交于 2019-12-08 06:54:41
问题 I have a scrollable timeline that is made from list views. When my mouse is focused over the list view. The cursor is a open hand using the code <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Cursor" Value="openHand.cur"/> </Trigger> </ControlTemplate.Triggers> but I was wondering. Is there something I can do if the left mouse button is pressed over the list view. if it is then change the Cursor to a closed hand? Thanks in advance! 回答1: WPF doesn't

Parse cursor output java

旧城冷巷雨未停 提交于 2019-12-08 06:24:08
问题 How can i parse the output from a linux cursor program like e.g top in java? I would like someone to give an example or link one. Right now i got top running like a Process object. And btw top is just an example of such a program. String[] args={"top"}; Process process = new ProcessBuilder(args).start(); 回答1: You can't. A program written using curses isn't outputting a stream of characters like a typical command-line program, or even one using the backspace trick. Instead, it's using

Fetch and bulk collect from a REF CURSOR returned by a procedure

旧巷老猫 提交于 2019-12-08 06:08:59
问题 I have a stored procedure that has a SYS_REFCURSOR as an OUT parameter. The signature is, for example, as follows: PROCEDURE myProc(p_someID IN INTEGER, p_cursor OUT SYS_REFCURSOR); I call this procedure from a function, where I have to copy a column named clientID from the p_cursor to a scalar nested table. I am doing as follows: CREATE OR REPLACE FUNCTION myFunction RETURN sys_refcursor IS someID INTEGER := 1234; myCursor SYS_REFCURSOR; TYPE t_clientID_nt IS TABLE OF NUMBER(16,0); clientID

How to update cursor records using WHERE CURRENT OF?

大憨熊 提交于 2019-12-08 06:01:40
问题 I'm getting "ORA-01410: Invalid ROWID" exception when executing this block. Any ideas why? DECLARE CURSOR c_orders IS SELECT * from orders FOR UPDATE OF no; v_order_record c_orders%ROWTYPE; BEGIN OPEN c_orders; LOOP FETCH c_orders INTO v_order_record; UPDATE orders SET no = 11 WHERE CURRENT OF c_orders; EXIT WHEN c_orders%NOTFOUND; END LOOP; CLOSE c_orders; END; However, everything works if using FOR IN syntax: DECLARE CURSOR c_orders IS SELECT * from orders FOR UPDATE OF no; BEGIN FOR rec IN

SQL cursors in android

你。 提交于 2019-12-08 05:45:54
问题 Suppose I run some query and get a cursor which I want to use to update the entries in the database. What happens if the database is updated while the cursor is not closed? For example, suppose the cursor is pointing at the 1st entry in the result set and I run a query that updates the 10th element. Does the current cursor reflect those changes? 回答1: The cursor is a copy of the results in memory, so you can modify the database at will. Since it's a copy, it won't reflect any changes - you'd

Using a database API cursor with JDBC and SQLServer to select batch results

匆匆过客 提交于 2019-12-08 05:43:38
问题 SOLVED (See answer below.) I did not understand my problem within the proper context. The real issue was that my query was returning multiple ResultSet objects, and I had never come across that before. I have posted code below that solves the problem. PROBLEM I have an SQL Server database table with many thousand rows. My goal is to pull the data back from the source database and write it to a second database. Because of application memory constraints, I will not be able to pull the data back