05-18-2006
I define the arraysize is 5000
The total rows is 2500
But cnt=sqlca.sqlerrd[2] just 550
How ?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
What are the various way's to fix /proc folder in redhat linux 7.2 and how to verify /proc folder is proper or croupted?
Thank in advance
Bache Gowda (7 Replies)
Discussion started by: bache_gowda
7 Replies
2. Shell Programming and Scripting
Hi-
I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment...
I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies
3. Shell Programming and Scripting
HI,
I'm trying to get this right, please can you help. In my unix korn shell script, I call an oracle stored proc within a package and I specify 3 parameters, 2 of which are IN OUT parameters (i.e. I expect the stored proc to change them and return them back to me).
Does the unix code... (7 Replies)
Discussion started by: csong2
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am trying to calculate the CPU Usage by getting the difference between the idle time reported by /proc/stat at 2 different intervals. Now the 4th entry in the first line of /proc/stat will give me the 'idle time'. But I also came across /proc/uptime that gives me 2 entries : 1st one as the... (0 Replies)
Discussion started by: coderd
0 Replies
5. UNIX for Dummies Questions & Answers
Hi guys,
I am new on here, I have a function in oracle that returns a specific value:
create or replace
PACKAGE BODY "CTC_ASDGET_SCHED" AS
FUNCTION FN_ASDSCHEDULE_GET
RETURN VARCHAR2
AS
BEGIN
DECLARE
ASDSchedule varchar2(6);
ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies
6. UNIX for Dummies Questions & Answers
If you are adding the kernel module without any module parameter passing, it should print out following information to info1 file so that user can make read access to info1 file (via, for example, cat /proc/info1):
• Processor type
• Kernel version
• Total number of the processes currently... (1 Reply)
Discussion started by: shekhar.huded
1 Replies
7. Shell Programming and Scripting
Hi!
I would like to do a single connection to sqlplus and execute some querys.
Actually I do for every query one connection to database
i.e
echo 'select STATUS from v$instance;
exit' > $SQL_FILE
sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT
echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
6 Replies
8. UNIX for Advanced & Expert Users
Hi Experts:
I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Discussion started by: huasheng8
3 Replies
9. Shell Programming and Scripting
Greeting everyone. Ok, I have spent the past few days googling for this and I keep hitting a wall. Many results brought me here, but the solutions were not quite right for this.
Basically my script (ksh) is run with an arg for a csv. My script so far appears to be storing the values from my... (4 Replies)
Discussion started by: dezdiggler
4 Replies
10. Shell Programming and Scripting
Hi All,
I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise.
Eg :
Select 'Query 1 output' from dual;
Select 'Query 2 output' from dual;
I want to... (3 Replies)
Discussion started by: Rokkesh
3 Replies
LEARN ABOUT CENTOS
dblink_get_result
DBLINK_GET_RESULT(3) PostgreSQL 9.2.7 Documentation DBLINK_GET_RESULT(3)
NAME
dblink_get_result - gets an async query result
SYNOPSIS
dblink_get_result(text connname [, bool fail_on_error]) returns setof record
DESCRIPTION
dblink_get_result collects the results of an asynchronous query previously sent with dblink_send_query. If the query is not already
completed, dblink_get_result will wait until it is.
ARGUMENTS
conname
Name of the connection to use.
fail_on_error
If true (the default when omitted) then an error thrown on the remote side of the connection causes an error to also be thrown locally.
If false, the remote error is locally reported as a NOTICE, and the function returns no rows.
RETURN VALUE
For an async query (that is, a SQL statement returning rows), the function returns the row(s) produced by the query. To use this function,
you will need to specify the expected set of columns, as previously discussed for dblink.
For an async command (that is, a SQL statement not returning rows), the function returns a single row with a single text column containing
the command's status string. It is still necessary to specify that the result will have a single text column in the calling FROM clause.
NOTES
This function must be called if dblink_send_query returned 1. It must be called once for each query sent, and one additional time to obtain
an empty set result, before the connection can be used again.
When using dblink_send_query and dblink_get_result, dblink fetches the entire remote query result before returning any of it to the local
query processor. If the query returns a large number of rows, this can result in transient memory bloat in the local session. It may be
better to open such a query as a cursor with dblink_open and then fetch a manageable number of rows at a time. Alternatively, use plain
dblink(), which avoids memory bloat by spooling large result sets to disk.
EXAMPLES
contrib_regression=# SELECT dblink_connect('dtest1', 'dbname=contrib_regression');
dblink_connect
----------------
OK
(1 row)
contrib_regression=# SELECT * FROM
contrib_regression-# dblink_send_query('dtest1', 'select * from foo where f1 < 3') AS t1;
t1
----
1
(1 row)
contrib_regression=# SELECT * FROM dblink_get_result('dtest1') AS t1(f1 int, f2 text, f3 text[]);
f1 | f2 | f3
----+----+------------
0 | a | {a0,b0,c0}
1 | b | {a1,b1,c1}
2 | c | {a2,b2,c2}
(3 rows)
contrib_regression=# SELECT * FROM dblink_get_result('dtest1') AS t1(f1 int, f2 text, f3 text[]);
f1 | f2 | f3
----+----+----
(0 rows)
contrib_regression=# SELECT * FROM
contrib_regression-# dblink_send_query('dtest1', 'select * from foo where f1 < 3; select * from foo where f1 > 6') AS t1;
t1
----
1
(1 row)
contrib_regression=# SELECT * FROM dblink_get_result('dtest1') AS t1(f1 int, f2 text, f3 text[]);
f1 | f2 | f3
----+----+------------
0 | a | {a0,b0,c0}
1 | b | {a1,b1,c1}
2 | c | {a2,b2,c2}
(3 rows)
contrib_regression=# SELECT * FROM dblink_get_result('dtest1') AS t1(f1 int, f2 text, f3 text[]);
f1 | f2 | f3
----+----+---------------
7 | h | {a7,b7,c7}
8 | i | {a8,b8,c8}
9 | j | {a9,b9,c9}
10 | k | {a10,b10,c10}
(4 rows)
contrib_regression=# SELECT * FROM dblink_get_result('dtest1') AS t1(f1 int, f2 text, f3 text[]);
f1 | f2 | f3
----+----+----
(0 rows)
PostgreSQL 9.2.7 2014-02-17 DBLINK_GET_RESULT(3)