SQL query output
Dear friends ,
I want to view a select query using page by page . Is it possible to do in SQL ?
suppose here is an example of select query :
sql > select * from v$session ;
I want to see the output as page by page .
waiting for ur kind reply . .. ..
Hi, (assuming you use Db 10g v.2)
you should read the chapter "6 Formatting SQL*Plus Reports" of e-book:
SQL*Plus® User's Guide and Reference
Release 10.2
Part Number B14357-01
and especially the 'break' command.....
Greetings,
Sim
Similar Messages
-
Writing a function to find whether a value is present in a sql query output
Hi gurus,
I would like to write a function to which i will pass a value and a sql query as parameters.
Now the function needs to execute that sql query and find whether the given value is present in the output list
when the query is executed. If it is present it should return 'T' otherwise 'F'
My function will look like
CREATE FUNCTION CHECK_VALUE(VALUE VARCHAR2,V_SQL VARCHAR2) RETURN VARCHAR2
SELECT CHECK_VALUE('Dallas','SELECT LOCATION_CODE FROM HR_LOCATIONS')
It should check whether the value 'Dallas' is present in the output list returned by the sql query.
Any help will be appreciated.
Thank you.CREATE OR REPLACE
FUNCTION CHECK_VALUE(
VALUE VARCHAR2,
V_SQL VARCHAR2
RETURN VARCHAR2
IS
RETVAL VARCHAR2(4000);
REFCUR SYS_REFCURSOR;
BEGIN
OPEN REFCUR FOR V_SQL;
LOOP
FETCH REFCUR INTO RETVAL;
EXIT WHEN REFCUR%NOTFOUND;
IF RETVAL = VALUE
THEN
CLOSE REFCUR;
RETURN 'T';
END IF;
END LOOP;
CLOSE REFCUR;
RETURN 'F';
END;
Function created.
SQL> SET SERVEROUTPUT ON
SQL> EXEC DBMS_OUTPUT.PUT_LINE(CHECK_VALUE('DALLAS','select loc from dept'));
T
PL/SQL procedure successfully completed.
SQL> EXEC DBMS_OUTPUT.PUT_LINE(CHECK_VALUE('PARIS','select loc from dept'));
F
PL/SQL procedure successfully completed.
SQL> SY. -
Formatting SQL Query output in HTMLDB
Guys, I would like to show the result in report of SQL Query to be formatted in such way:
I got a table USERS with columns:FIrst_name, second_name, team_name, team_leader.
So in a report in HTMLDB I would like to format the result to show all employees , 500 of them, on 1 page, and show in a header for each team, team leader and team name with the rest of team underneath,so only two columns, break on team_leader or team_name, then next team, and then, NOT all this in one long display, but in three sets of result, spread in wide of report, cause the screen dimensions are quite wide.I tried few things but they do not work. I can break on tem leader or team name, but all this is still in one long set of result, not in 3 or 4 tables sets.
help
JozefHi Kamal,
I am using Oracle Applications 11.5.7 iProcurement. Database is 9i. I need to place a link in iProcurement homepage using AK Developer and when clicked it should run a query and output the result in a browser.
help appreciated
thanks -
SQL query Output exceeds 65000 rows in excel
Hi,
I have a SQL file attached to my concurrent program. The query in the SQL file returns tab separated output that i need to email as a csv through the same SQL file.
The issue I am facing is that the query returns about 157000 records but only 65536 are being displayed in the excel worksheet.
How can I get all the records by accommodating them in multiple worksheets of the same excel file?
Please help!
I am using EBS 11i.
Code I am using in SQL file:
set pages 3000
set lines 300
set heading off
set term off
set feedback off
set verify off
set echo off
set serverout off
spool /tmp/TEST.csv
select 'Header'
from dual
SELECT column1||CHR(9)||column2
FROM staging_table
spool off
set lines 1000 pages 40 head off echo off veri off
select 'cd /tmp; cat $XX_TOP/install/sql/disclaimer.txt > x.dat; cat '||'/tmp/TEST.csv'||' | uuencode '||'/tmp/TEST.csv'
||' > '||substr('/tmp/TEST.csv',1,length('/tmp/TEST.csv')-4)||'.dat >> x.dat'
||' ; mail -s ''' ||'&1'||''' '||'&2'||' < x.dat'
||' ; rm '||substr('/tmp/TEST.csv',1,length('/tmp/TEST.csv')-4)||'.dat'||' ;'
from dual
list
spool /tmp/email.txt
spool off
host chmod 777 /tmp/email.txt
host /tmp/email.txt
Thanks
Edited by: user10648285 on May 13, 2011 5:27 AMopen a blank Excel (2007 version), go to Data tab, then from External Data click From Text, select the CSV file (That having more than 65k records), click import, then from "start import at row" select 65001 and click next button, select delimiter as Comma, click Next button and filaly finish.
In this way you will have the data after 65k rows in excel. Now you can simply open that cvs file in excel then you will have first 65k records (remening part will be discarded).
So now you have two excel files and you can paste it in two diff tab.
Note - you can repeate this activity if you have more than 130000 records... -
SBO SQL Query outputs zero values as nulls but need the zeros
Hi all,
I'm having a problem with a query I'm writing in SBO where if the field contents are zero, these are output as null.
I have a field for the stock usage on sales orders and ont too for production orders, but if I add these together they only provide a result if both columns contain a numeric value.
I've tried adding "0" to the column value, adding and subtracting "1" and also multiplying the value by "1" but still no joy.
I have also tried adding a "cast" statement to the column, but that doesnt seem to have an effect either (I think as this is more an output function).
I need to be able to use these columns as separate displays in addition to being used in a further column as part of a calculation.
If anyone has an idea how I can output a true zero value as opposed to a null value your help would be appreciated.
Cheers,
JHello Julian,
You could try to use a CASE Statement as I have shown below and test this will the SQL below. If you use the T0.LineNum without any CASE or CAST the LineNum 0 will show as blank in SAP.
SELECT
CASE WHEN T0.LineNum != 0 THEN CAST(T0.LineNum AS VARCHAR(10)) ELSE '0' END AS 'Row Number',
T0.ItemCode AS 'Item No.', T0.BaseQty AS 'Base Quantity', T0.PlannedQty AS 'Planned Quantity - Rows' FROM [dbo\].[WOR1\] T0 -
Table1:
ID EMPNAME COUNTRY
101 XYZ USA
102 ABC UK
103 XYZ USA
104 ABC UK
Required output:
ID EMPNAME COUNTRY CALCULATED_VALUE
101 XYZ USA 1
102 ABC UK 1
103 XYZ USA 0
104 ABC UK 0
Every 1st record of (EMPNAME, COUNTRY) combination should have CALCULATED_VALUE =1 and all succeeding records of same (EMPNAME, COUNTRY) combination should have CALCULATED_VALUE =0Try this ->
scott>
scott>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Elapsed: 00:00:00.02
scott>
scott>
scott>with t
2 as
3 (
4 select 101 ID, 'XYZ' EMPNAME, 'USA' COUNTRY from dual
5 union all
6 select 102, 'ABC', 'UK' from dual
7 union all
8 select 103, 'XYZ', 'USA' from dual
9 union all
10 select 104, 'ABC', 'UK' from dual
11 )
12 select ID,
13 EMPNAME,
14 COUNTRY,
15 case
16 when rn = 1 then
17 1
18 else
19 0
20 end CALCULATED_VALUE
21 from (
22 select ID,
23 EMPNAME,
24 COUNTRY,
25 row_number() over(partition by COUNTRY order by ID) rn
26 from t
27 )
28 order by ID;
ID EMP COU CALCULATED_VALUE
101 XYZ USA 1
102 ABC UK 1
103 XYZ USA 0
104 ABC UK 0
Elapsed: 00:00:00.00
scott>Regards.
Satyaki De. -
hi All,
select substr(16878575,1, (length(16878575)-length(substr(16878575, -2,2)))) ||'.' || substr(16878575, -2,2) from dual;
output - 168785.75. getting correct output.
Can you please let me know is there any other way to do that?
thanks in advance.This way, if you need to get a number with Two Decimal places.
with data as
select 16878575 col from dual
select col/100 col from data;
COL
168785.75 -
SQL Query - The number of columns specified in "SQL Query" does not match t
I am creating new UDM for tablespace alert, below is my query,however its failing with error
SQL Query - The number of columns specified in "SQL Query" does not match the value specified in "SQL Query Output"
I selected Metric type is number
SQL Query Format : Two columns
Query:
SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2)
used_pct FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
Any clues why i am getting error.SQL> SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2) used_pct
2 FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
3 WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
4 AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
TABLESPACE_NAME USED_PCT
MGMT_TABLESPACE .82
SYSAUX 1.52
UNDOTBS1 .32
RMAN .02
CORRUPT_TS 10.63
USERS 0
SYSTEM 2.26
MGMT_ECM_DEPOT_TS .04
MGMT_AD4J_TS 0 -
New Line Character in SQL Query
Dear All,
I am wondering if some one tell me how to insert new line character in the SQL Query Output for example I need out put in the following format. Every line on new line.
The total count is:
Registration: 1111
Fees paid: 2222
Admission Done: 3333
Total:4000
Many thanksHi
SQL> select
2 'The total count is:
3 Registration: 1111
4 Fees paid: 2222
5 Admission Done: 3333
6 Total:4000
7 ' dummy_txt from dual
8 /
DUMMY_TXT
The total count is:
Registration: 1111
Fees paid: 2222
Admission Done: 3333
Total:4000
SQL>
SQL> select 'a'||chr(10)||'b' from dual;
'A'
a
b
SQL> T -
SQL Query in Japanese Language
Hello ,
May i please ask a query.... We have a japanese customer and he prefers to get the SQL Query output in Japanese output. Is that possible via SQLPLUS?
Regards
AjayMay i please ask a query.... We have a japanese customer and he prefers to get the SQL Query output in Japanese output. Is that possible via SQLPLUS?Yes, make sure you set NLS_LANG properly.
The correct NLS_LANG setting in Unix Environments [ID 264157.1]
The correct NLS_LANG in a Windows Environment [ID 179133.1]
NLS_LANG Explained (How does Client-Server Character Conversion Work?) [ID 158577.1]
How to Determine the NLS_LANG setting of the SQL*Plus Client? [ID 344891.1]
The Priority of NLS Parameters Explained (Where To Define NLS Parameters) [ID 241047.1]
AL32UTF8 / UTF8 (Unicode) Database Character Set Implications [ID 788156.1]
Thanks,
Hussein -
Using 'Function Returning SQL Query' with Flash charts
I have created a pl/sql function that returns a SQL query as a varchar2 of this form:
select null link
<x value> value
<Series1 y value> Series 1 Label
<Series2 y value> Series 2 Label
<Series3 y value> Series 3 Label
from tablea a
join tableb b
on a.col = b.col
order by <x value>
If I now call the function from a Flash Chart Series SQL box with the Query Source Type set to 'Function Returning SQL Query' like this:
return functionname(to_date('30-sep-2010', 'dd-mon-yyyy'))
it parses correctly and the page is saved; however, when I run the page I don't get any output - nor any error messages or other indication of a problem.
Now, if I call the function in a SQL client, capture the SQL query output using dbms_output and paste that into the Flash Chart Series SQL box - changing the Query Source Type to SQL Query - and save the page it works fine when I run it and returns a multi-series flash chart.
Can anyone suggest either;
1. What have I might have missed or done wrong?
2. Any way to usefully diagnose the problem...
I have tried using the Apex debugger - which is very nice, by the way - but it doesn't provide any info on what my problem might be. I even tried writing my own debug messages from my function using the apex_debug_message package - got nothing...
Thanks,
EricHi Eric,
Try expressing the source as this:
begin
return functionname(to_date('30-sep-2010', 'dd-mon-yyyy'));
end;That works fine for me, and if I take out the begin-end and the trailing semicolon from the return statement I get the same behavior as you.
It does mention in the help for the source (only during the wizard though) that this source type has to be expressed that way, but I agree it would be helpful if the tool would validate for this format when 'Function Returning SQL Query' is used or give some sort of indication of the trouble. Anyway, this should get you going again.
Hope this helps,
John
If you find this information useful, please remember to mark the post "helpful" or "correct" so that others may benefit as well. -
SQL query for custom alert view
I have created a custom alert view and scoped to show alerts related to group of servers.
Alert view Criteria: Resolution State - New, Severity - Warning and Critical, Group - "Group 1"
I am trying to query the Operations Manager database to show the alerts with same criteria using below query.
select MonitoringObjectName, ResolutionState, Priority, Severity, TimeRaised, TimeAdded, TimeResolved, AlertStringName, AlertStringDescription from AlertView where ResolutionState = '0' AND (Severity = '2' or Severity = '1')
AND
MonitoringObjectId IN (select TargetObjectId from RelationshipGenericView
where SourceObjectDisplayName = 'Group 1')
in Console i see both warning and critical alerts where as in SQL query output i see only critical alerts. Could you please correct if I am using wrong query. also please share your suggessions if i am completely wrong on this.
Kind Regards,
Bommi
~Bommiyour query looks perfectly fine. Are you sure if the alerts you see in the console are of the 'Resolution State =0' (New). It might be the case where the alert have moved to a fidderent resolution state.
Also, take a sample warming alert from console, query for the same in DB and check the Severity value. If it is '2'.
Regards,
Saravanan -
Storing the SQL Query results as XML
Hi All,
I have a proc to select all the data from emp table and insert into another table. For some reason it inserts only one column and one record.
I don't have any row limit or skip ...
CREATE OR REPLACE procedure Convert_Data_Into_XML1
as
-- Var Declartion
qryCtx DBMS_XMLGEN.ctxHandle;
result CLOB;
BEGIN
qryCtx := dbms_xmlgen.newContext('SELECT * from emp');
-- set the row header to be EMPLOYEE
DBMS_XMLGEN.setRowTag(qryCtx, 'Employee-ROW');
DBMS_XMLGEN.setRowsetTag(qryCtx, 'Employee-rowset');
LOOP
-- now get the result
result := DBMS_XMLGEN.getXML(qryCtx);
DBMS_OUTPUT.PUT_LINE ('In the Loop');
EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
INSERT INTO temp_clob_tab VALUES (result);
END LOOP;
COMMIT;
--close context
DBMS_XMLGEN.closeContext(qryCtx);
exception
when others then
dbms_output.put_line(TO_CHAR(sqlerrm));
END;
Basically I got this sample proc from Oracle website. As per the website I should be able to store all the records from emp table.
How can I debug this.
Here is the output from SQLPLUS>
SQL> select result from temp_clob_tab;
RESULT
<?xml version="1.0"?>
<Employee-rowset>
<Employee-ROW>
<EMPNO>7369</EMPNO>
>>>>>>>>>>
Thanks in advance
SivaI am able to convert the SQL query output and I am able to store it in a XMLTYPE column.
But the code doesn't work when I took the same code and try to Implement inside a Trigger. The reason I am doing this is, when there is an update or delete, I want to store the whole record as a XMLTYPE doc (before and After). But the code compiles fine, but when I tried to update a record it gives error.
CREATE OR REPLACE TRIGGER INS_UPDDEV_EMP3_F
BEFORE UPDATE OR DELETE ON EMP
FOR EACH ROW
DECLARE
V_DBUSER VARCHAR2(50);
V_CHANGETYPE VARCHAR2(20) := 'INSERT' ;
QRYCTX DBMS_XMLGEN.CTXHANDLE ;
OLDVALUE XMLTYPE;
NEWVALUE XMLTYPE;
BEGIN
IF :OLD.EMPNO <> :NEW.EMPNO or DELETING then
---------- old Value
QRYCTX := DBMS_XMLGEN.NEWCONTEXT ('SELECT :OLD.EMPNO, :OLD.ENAME, :OLD.JOB, :OLD.MGR, :OLD.HIREDATE, :OLD.SAL, :OLD.COMM, :OLD.DEPTNO FROM EMP WHERE EMPNO=:OLD.EMPNO ');
DBMS_XMLGEN.SETROWTAG (QRYCTX, 'DEPTROW');
DBMS_XMLGEN.SETROWSETTAG(QRYCTX, 'DEPTSET');
OLDVALUE := XMLTYPE(DBMS_XMLGEN.GETXML(QRYCTX));
------------------------- new Value
QRYCTX := DBMS_XMLGEN.NEWCONTEXT ('Select * WHERE EMPNO=:NEW.EMPNO '); -- WHERE :OLD.EMPNO
DBMS_XMLGEN.SETROWTAG (QRYCTX, 'DEPTROW');
DBMS_XMLGEN.SETROWSETTAG(QRYCTX, 'DEPTSET');
NEWVALUE := XMLTYPE(DBMS_XMLGEN.GETXML(QRYCTX));
V_CHANGETYPE := 'UPDATE' ;
INSERT INTO ADM_RECAUDITHISTORY VALUES ('table emp', 'fIELD all', OLDVALUE, OLDVALUE,
V_CHANGETYPE , SYSDATE, 'TIGER TRIG');
commit;
END IF;
END;
I am getting the following error while updating the record.
>>>>
ERROR at line 1:
ORA-19206: Invalid value for query or REF CURSOR parameter
ORA-06512: at "SYS.DBMS_XMLGEN", line 83
ORA-06512: at "SCOTT.INS_UPDDEV_EMP3_F", line 13
ORA-04088: error during execution of trigger 'SCOTT.INS_UPDDEV_EMP3_F'
>>>>>
Is anyone knows why I am getting this error.
Thanks
Siva -
for example:
create table testtable (
order_number number(4),
item_id number(4),
quantity number(8),
item_desc varchar2(16)
insert into testtable values (1001,1,10,'apple');
insert into testtable values (1001,2,20,'banana');
insert into testtable values (1002,2,50,'banana');
insert into testtable values (1002,1,30,'apple');
insert into testtable values (1003,3,60,'orange');
insert into testtable values (1004,3,50,'orange');
commit;
Table Test DATA
order_number item_id quantity item_desc
1001 1 10 apple
1001 2 20 banana
1002 2 50 banana
1002 1 30 apple
1003 3 60 orange
1004 3 50 orange
i want to make above sql query output in 3 pages.
order_number item_id quantity item_desc
1001 1 10 apple
1001 2 20 banana
when i click next_page it output below:
order_number item_id quantity item_desc
1002 2 50 banana
1002 1 30 apple
and when i click next_page again it will output below:
order_number item_id quantity item_desc
1003 3 60 orange
1004 3 50 orange
using url:http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_paged.html
please look at three php code below:
php code:
<?php
$con = oci_connect('apps','apps','prod');
$sql = "select distinct h.order_number,h.order_type_id,h.price_list_id
from oe_order_headers_all h
where to_char(h.ordered_date,'YYYYMMDD') = '20060627'
and h.org_id = 82
order by order_number ASC";
$result = oci_parse($con,$sql);
oci_execute($result);
echo "<table border = 1>";
echo "<tr><td>order_number</td>";
echo "<td>order_type</td>";
echo "<td>price_id</td></tr>";
while ($rows = oci_fetch_array($result,BOTH_NUM)) {
echo "<tr><td>". $rows[0]."</td>";
echo "<td>".$rows[1]."</td>";
echo "<td>".$rows[2]."</td></tr>";
?>
pager_functions.php
<?php
function total_pages($total_rows, $rows_per_page) {
if ( $total_rows < 1 ) $total_rows = 1;
return ceil($total_rows/$rows_per_page);
function page_to_row($current_page, $rows_per_page) {
$start_row = ($current_page-1) * $rows_per_page + 1;
return $start_row;
function count_rows(& $conn, $select) {
$sql = "SELECT COUNT(*) AS num_rows FROM($select)";
$stmt = oci_parse($conn,$sql);
oci_define_by_name($stmt,"NUM_ROWS",$num_rows);
oci_execute($stmt);
oci_fetch($stmt);
return $num_rows;
function & paged_result(& $conn, $select, $start_row, $rows_per_page) {
$sql = "SELECT
FROM
SELECT
r.*, ROWNUM as row_number
FROM
( $select ) r
WHERE
ROWNUM <= :end_row
WHERE :start_row <= row_number";
$stmt = oci_parse($conn,$sql);
oci_bind_by_name($stmt, ':start_row', $start_row);
// Calculate the number of the last row in the page
$end_row = $start_row + $rows_per_page - 1;
oci_bind_by_name($stmt, ':end_row', $end_row);
oci_execute($stmt);
// Prefetch the number of rows per page
oci_set_prefetch($stmt, $rows_per_page);
return $stmt;
?>
outpages.php:
<?php
$conn = OCILogon('scott', 'tiger') or die ("Unable to connect to db");
require_once 'pager_functions.php';
$rows_per_page = 3;
$url = 'results.php'; // URL to this script
$sql = 'SELECT * FROM testtable ORDER BY rank ASC'; // The unfiltered
// Get the total page count from the number of rows
$total_rows = count_rows($conn,$sql);
$total_pages = total_pages($total_rows, $rows_per_page);
// Make sure the page number is a sane value
if ( !isset($_GET['page']) ||
!preg_match('/^[0-9]+$/',$_GET['page']) ||
$_GET['page'] < 1 ) {
$_GET['page'] = 1;
} else if ( $_GET['page'] > $total_pages ) {
$_GET['page'] = $total_pages;
// Translate the page number into a starting row number
$start_row = page_to_row($_GET['page'], $rows_per_page);
// Filter to a single page of rows
$stmt = & paged_result($conn, $sql, $start_row, $rows_per_page);
?>
<table width="600">
<caption>Feedster Top 500 Blogs [#<?php echo $_GET['page']; ?>]</caption>
<thead>
<tr>
<th>Rank</th>
<th>Blog</th>
<th>Inbound Links</th>
</tr>
</thead>
<tbody>
<?php while (OCIFetchinto($stmt,$row,OCI_ASSOC)) { ?>
<tr valign="top">
<td align="right"><?php echo htmlspecialchars($row['RANK']); ?></td>
<td>
">
<?php echo htmlspecialchars($row['NAME']); ?>
</a>
</td>
<td align="right"><?php echo htmlspecialchars($row['LINKS']); ?></td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<tr>
<td colspan="3" align="center">
<?php echo draw_pager($url, $total_pages, $_GET['page']); ?>
</td>
</tr>
</tfoot>
</table>
?>
above two php codes in the same folder
when i run outpages.php it runs below result:
Feedster Top 500 Blogs [#1]
Rank Blog InboundLinks
may be above php code doesn't output what i mean .
who can help me ?Hi,
Your table testtable is defined as follows:
create table testtable (
order_number number(4),
item_id number(4),
quantity number(8),
item_desc varchar2(16)
In your script, you are refering to the columns 'RANK', 'NAME', 'URL' and 'LINKS'!!!
They simly doesn't exist.
You simply copied and pasted a snippet from the oracle-php-cookbook without adapting it to your needs. (And I assume without understanding, what that code will do.)
Greetings from Hamburg
Thorsten Körner -
How to Suppress The Output of a SQL Query In Oracle 11gR2
Hi Friends,
I am using oracle version 11.2.0.1, I have set a cronjob which will run on every 15 minutes and give us a log file mentioning the execution time taken for that SQL query:-
For example:
SQL> set timing on;
SQL> SELECT objProp FROM aradmin.arschema WHERE (schemaId = 175);
OBJPROP+
--------------------------------------------------------------------------------+
*6\60006\4\0\\60008\40\0\60009\4\0\\60010\4\0\\60018\4\0\\600*
*22\4\68\1\63\AR:jRL#*
Elapsed: 00:00:00.00
The above query will return the output as well as the time taken for execution of the query. I want to suppress the output of the query and only want the time taken to be printed. Is it possible by set commands. I have marked the output as bold and made it Italic.
Please help me at the earliest.
Regards,
Arijit>
I am using oracle version 11.2.0.1, I have set a cronjob which will run on every 15 minutes and give us a log file mentioning the execution time taken for that SQL query:-
The above query will return the output as well as the time taken for execution of the query. I want to suppress the output of the query and only want the time taken to be printed. Is it possible by set commands. I have marked the output as bold and made it Italic.
>
How would that even be useful?
A query from a tool such as sql*plus is STILL going to send the output to the client and the client. You can keep sql*plus from actually displaying the data by setting autotrace to trace only.
But that TIME TAKEN is still going to include the network time it takes to send ALL rows that the query returns across the network.
That time is NOT the same as the actual execution time of the query. So unless you are trying to determine how long it takes to send the data over the network your 'timing' method is rather flawed.
Why don't you tell us WHAT PROBLEM you are trying to solve so we can help you solve it?
Maybe you are looking for
-
How to assign the same GTIN for different material?
Hi, I've managed to install an internal number assignment for the GTIN / EAN in material master which works fine. Now we need to assign the same GTIN to different material numbers. Since the defined number range is marked as internal I cannot use th
-
Import and Export in 4.6b
Hi All, I have a syntax regarding Import and Export statements which are not working in 4.6b. Below is the statement. IMPORT ID = (Internal Table) FROM DATA BUFFER ( String Variable ). EXPORT ID = (Internal Table) TO DATA BUFFER ( String Variable ).
-
Apache and PHP not working together
Hey all, Ok, I reinstalled my server yesterday and followed the LAMP wiki to set up Apache, MySQL, and PHP. Now, I got Apache and MySql working great, but when I go to directory that has a .php file to open, my brower is asking me what application I
-
Group Policys won't update. Possibly tied to server updating
Hello, we aren't sure if this is a SLES Issue, or a ZCM Issue. We are using ZCM 11.2.4 And Server SLES 11.2 This server was originally a physical server running SLES 10 SP3 and ZCM 11. It was virtualized and then upgraded to its current state. This w
-
Cisco WLC ISE integration issue
Dear all, We have wlc 5508 and ISE integration, out wireless clients can connect to Guest or Corporate SSID When connecting to Corporate SSID, they can obtain IP address and successfully associate, to use internal service like (email, corporate servi