Retrieve specific range data from oracle table
Hi, Dear friends,
I want to retrieve all the data from oracle table and then save them to mysql table using JDBC ResultSet. The problem is that some oracle table is too big, if I retrieve all of them to memory at a once time using excuteQuery, the program will become no response out of memory limitation. So my question is if I can retrieve just specific range data once a time. I can¡¯t find this function through JDBC API. Also, I don¡¯t want to use the specific sql sentence, for example ¡°select ¡ from¡ where someid>¡ and someid<¡¡±, because there are many different tables, I want to transfer them automatically. So I can¡¯t construct such sql sentence in advance. Does anyone know if oracle JDBC driver provide such kind of function or does there any other way?
Any suggestion will be greatly appreciated!
Sammy
Dear Justin,
thank you so much for your prompt reply!
as your suggestion, I do check the performance while my program is running, after the program become nearly no response, I found the memory usage is nearly 100%, while disk usage and process usage is pretty low. that's the reason why I guess maybe the memory limitation, but the strange thing is that no any error reported by JBuilder, it just nearly no response and don't transfer any data any more. my os is windows xp, the version of JBuilder is 7. my main memory is 768M. just as you said, the total 6,000 records in not very large, just no more than 400K. another strange thing is that why my program works well when there is little data records in the table.
the big picture of my program is first I retrieve oracle table metadata, according to this information, I construct DDL sql words and then create the corresponding table in mysql database. this part works well. in order to save your time, I will not paste the code here. then there is a method to transfer oracle data to mysql table, whenever creating the mysql table, then I will call this method to transfer datat to it. the following is the code of this method, I am very sorry to take your time. please read it when you are available.
thank you very much!!
Sammy
//transfer data from oracle to mysql!!!
private static void transferData(Connection oracleConn, Connection mysqlConn, String oracleTableName, String oracleSchemaName) throws SQLException{
Statement oracleStmt=oracleConn.createStatement();
Statement mysqlStmt=mysqlConn.createStatement();
// sending sql to oracle to retrieve data
String thisTableName=oracleTableName;
String oracleSQL="SELECT * FROM ".concat(thisTableName);
ResultSet oracleRS = oracleStmt.executeQuery(oracleSQL);
String sql="";
if (oracleRS.next()) {
ResultSetMetaData rsmd = oracleRS.getMetaData();
int colCount = rsmd.getColumnCount();
do {
String sqlBodyPart="";
String sqlValuePart="";
System.out.println("the number of column is "+colCount);
for (int i = 1; i <= colCount; i++) {
String columnValue = oracleRS.getString(i);
boolean b = oracleRS.wasNull();
String columnName =rsmd.getColumnName(i);
System.out.println("the value of column " + i + "is " + columnValue);
//construc the sql body part and value part
sqlBodyPart=sqlBodyPart.concat(" ").concat(columnName).concat(",");
if(b){ //if the value of the column i is null
sqlValuePart=sqlValuePart.concat(" null").concat(",");
}else{
sqlValuePart=sqlValuePart.concat(" '").concat(columnValue).concat("',");
//get rid of the last comma in sqlBodyPart and sqlValuePart
if(!sqlBodyPart.equalsIgnoreCase("")) sqlBodyPart=sqlBodyPart.substring(0,sqlBodyPart.length()-1);
if(!sqlValuePart.equalsIgnoreCase("")) sqlValuePart=sqlValuePart.substring(0,sqlValuePart.length()-1);
//construct the sql sentence!!!
sql="INSERT INTO ".concat(thisTableName).concat(" (").concat(sqlBodyPart).concat(") ").concat(" VALUES(").concat(sqlValuePart).concat(")");
System.out.println("the sql words for this column is");
System.out.println(sql);
System.out.println(" ");
if(mysqlStmt!=null){
int rows = mysqlStmt.executeUpdate(sql);
} else{
System.out.println("can't connect with mysql server");
System.exit(1);
while (oracleRS.next());
} else {
System.out.println("There are no data in the table...");
}//end of method data transfer!
//end of method data transfer!
Similar Messages
-
Retrieve data from oracle table, table name passed in runtime into JSP
Hello All,
I am new to JSP, i have a requirement,
I need to retrieve data from oracle table, here table is passed at random. how to get the data displayed in JSP page.
can any one help me in that
thanks1) Learn SQL.
2) Learn Java.
3) Learn JDBC.
4) Learn DAO.
5) Learn HTTP.
6) Learn HTML.
7) Learn JSP/Servlet.
8) Learn JSTL.
9) Apply learned things and develop.
Whenever you stucks, please come back and post the specific coding/technical problem here. -
Using FDM to load data from oracle table (Integration Import Script)
Hi,
I am using Integration Import Script to load data from oracle table to worktables in FDM.
i am getting following error while running the script.
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
Attaching the full error report
ERROR:
Code............................................. -2147217887
Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
At line: 22
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 6260
IDENTIFICATION:
User............................................. ******
Computer Name.................................... *******
App Name......................................... FDMAPP
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... DBNAME
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SCRTEST
Location ID...................................... 750
Location Seg..................................... 4
Category......................................... FDM ACTUAL
Category ID...................................... 13
Period........................................... Jun - 2011
Period ID........................................ 6/30/2011
POV Local........................................ True
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
I am using the following script
Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
'Oracle Hyperion FDM Integration Import Script:
'Created By: Dhananjay
'Date Created: 1/17/2012 10:29:53 AM
'Purpose:A test script to import data from Oracle EBS tables
Dim cnSS 'ADODB.Connection
Dim strSQL 'SQL string
Dim rs 'Recordset
Dim rsAppend 'tTB table append rs object
'Initialize objects
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
'Connect to SQL Server database
cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
'Create query string
strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
'Get data
rs.Open strSQL, cnSS
'Check for data
If rs.bof And rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No Records to load!"
Exit Function
End If
'Loop through records and append to tTB table in location’s DB
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = RES.PlngCatKey
rsAppend.Fields("PeriodKey") = RES.PdtePerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("CalcAcctType") = 9
rsAppend.Fields("Amount") = rs.fields("Amount").Value
rsAppend.Fields("Desc1") = rs.fields("Description").Value
rsAppend.Fields("Account") = rs.fields("Account").Value
rsAppend.Fields("Entity") = rs.fields("Entity").Value
rsAppend.Update
rs.movenext
Loop
End If
'Records loaded
RES.PlngActionType = 6
RES.PstrActionValue = "Import successful!"
'Assign Return value
SQLIntegration = True
End Function
Please help me on this
Thanks,
Dhananjay
Edited by: DBS on Feb 9, 2012 10:21 PMHi,
I found the problem.It was because of the connection string.The format was different for oracle tables.
PFB the format
*cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
And thanks *SH* for quick response.
So closing the thread......
Thanks,
Dhananjay -
How can i extract data from oracle table to flat file or excel spread shee
Hello,
DB Version is 10.1.0.3.0
How can i extract data from oracle table to flat file or excel spread sheet by using sub programs?
Regards,
DHere what I did
SET NEWPAGE 0
SET SPACE 0
SET LINESIZE 80
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET HEADING OFF
SET MARKUP HTML OFF SPOOL OFF
Sql> SPOOL bing
select * from -------;
SPOOL OFF;
I do not see file.
I also tried
Sql> SPOOL /tmp/bing
select * from -------;
SPOOL OFF;
But still not seeing the fie, -
JSON - get data from Oracle table
Hi all,
I hope it is correct thread...
My need is to get data from oracle table using JSON and show output at html table. I'm very new to JSON (got some experience in PL/SQL and basic html knowledge). Could someone direct me to manual or give me simple example?JSON is a way to format data, not a way to fetch data. Call it an alternative to XML.
Are you perhaps talking about doing an ajax request to fetch data? -
How to copy the Data From Oracle Table To SAP Table
Hi Friends,
We need to copy the data from Oracle Database Table to SAP Table. The data should be updated simultaneously in both tables . Should I write a program that contains the native sql statement like EXEC SQL PERFORMING WRITE,....
I appreciate any suggestions regarding this.
Regards
CSM ReddyHi,
since you posted this question in the DB2 forum I assume that you are using a DB2 database for your SAP system.
To access a table from a legacy ORACLE database you may use the DBSL multiconnect feature. I.e. you open a secondary connecction in the SAP system to your ORALE database. You can then ready the data from the ORACLE database into an ABAP internal table and insert it afterwards into the DB2 table on the main connection.
Another way to access an ORACLE table from a DB2 database is to use the DB2 federated database feature. This requires a little bit more DB2 skill. With this feature you can make the ORACLE table visible within the DB2 database. To copy data you can then simply use a "INSERT ... SELECT" statement.
Regards
Frank -
# coming when I select data from oracle table using Native SQL
Hi Gurus,
I am selecting 'First name' from oracle table directly using native sql. I am fetching 65000 records but 10+ records having '#' at the end of firstname. For eg: John#.
But oracle team couldn't find '#' in their table for those records. What could be problem?
or what could be the character in oracle which comes as '#' in abap?
Pls help...
SajThanks for replies.
My DB NLS_PARAMETER is AL32UTF8. I am able to pullout data with older version of ojdbc jar file. So I think there is no issue regarding NLS setting.
So please guide me with proper solution as soon as possible. -
Script/Tool to unload data from Oracle table
We are in the process of migrating application from release 1.0 to 2.0.
To migrate Oracle data from release 1.0 to 2.0 our task is as follows:
1) Unload data from release 1.0 tables
2) Add, Move or remove data to load in release 2.0 tables
3) Load data to release 2.0 tables
I am looking for scripts in regards to migration/conversion so we do not have to reinvent the wheel and write scripts from scratch.
To load data we can use SQLLOADER.
Looking for scripts to unload data from a table or tables and to generate control file for sql loader.
Any help in this regards will be appreciated.
Thanks,
HemantTry taking a peek at Thomas Kyte's Unloader solution: http://osi.oracle.com/~tkyte/flat/index.html
-
Load data from Oracle table,CSV to Hyperion Essbase
Hi All,
when i am executing interface(load data into hyperion essbase from oracle table and csv files),
I am getting below error.
com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Error during task interpretation
Task:1
java.lang.Exception: BeanShell script error: Sourced file: inline evaluation of: ``out.print("drop table TEMP_BIAPPS.A3$") ; out.print(thread) ; out.print("_0Combi . . . '' : Undefined argument: thread : at Line: 2 : in file: inline evaluation of: ``out.print("drop table TEMP_BIAPPS.A3$") ; out.print(thread) ; out.print("_0Combi . . . '' : ( thread )
BSF info: Drop work table at line: 0 column: columnNo
at com.sunopsis.dwg.codeinterpretor.a.a(a.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.k(e.java)
at com.sunopsis.dwg.cmd.g.A(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
Text:drop table TEMP_BIAPPS.A3$<?=thread?>_0Combination1 A
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.k(e.java)
at com.sunopsis.dwg.cmd.g.A(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
Can any one help me out?
Edited by: 791206 on Nov 17, 2010 11:16 PM
Edited by: maulik vadodariya on Nov 17, 2010 11:16 PM
Edited by: maulik vadodariya on Nov 17, 2010 11:17 PM
帖子经 791206编辑过Hi All,
It was staging area problem.
So,I created new schema(User/Password in Oracle Database),and give staging area to that newly created schema(Defination Tab of Interface).
Also,in Flow tab,I selected LKM File to SQL. and problem resolved.
Thanks,
Maulik G. Vadodariya
Edited by: Maulik Vadodariya on 22 Nov, 2010 2:36 PM -
Problem fetch data from oracle table to ODI variable
Hi
I created a procedure in ODI to fetch a record from oracle table and store it into ODI variable. In table all columns have values but those values are not storing in to ODI variables when ODI execute procedure
After execution, i am getting following exception
java.lang.Exception: Variable has no value: ORACLEEBIZ_PAS_BULK_LOAD_PROJECT.PVV_ORGANIZATION_CODE
at com.sunopsis.dwg.dbobj.SnpVarSess.getValue(SnpVarSess.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.bindSessVar(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.bindSessVar(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskPreTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Thread.java:595)
My Procedure: (Please let me know the following ODI procedure correct or not)
begin
select
item_number,
primary_uom_code,
organization_code,
best_by_date,
expiration_date,
lot_number,
origination_date,
retest_date
into
'#PVN_LOT_NUMBER',
'#PVV_PRIMARY_UOM_CODE',
'#PVV_ORGANIZATION_CODE',
'#PVV_BEST_BY_DATE',
'#PVV_EXPIRATION_DATE',
'#PVV_LOT_NUMBER',
'#PVV_ORIGINATION_DATE',
'#PVV_RETEST_DATE'
from (select rownum r,b.* from apps.MTL_OPSM_LOT_EXPORT_V_TEST b) where r='#PVN_ROW_COUNT';
end;
Please help me to resolve the issue
Thanks in advance
Regards
Phani
Edited by: Phanikanth on Jun 29, 2010 6:36 AM
Edited by: Phanikanth on Jun 30, 2010 3:43 AM
Edited by: Phanikanth on Jun 30, 2010 3:59 AMSSIS Import/Export Wizard is the best choice:
http://www.sqlusa.com/bestpractices/ssis-wizard/
Alternative is linked server:
http://www.sqlusa.com/bestpractices/linktooracle/
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Retrieve data from oracle table
hi,
i have uploaded a piece of xml format data in oracle and successfully uploaded but when trying to retrieve data it reterieve 0 records. Oracle version is given below:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
create table temp_loading_lob(
xml_id varchar2(3),
q_clob CLOB
nologging
create table temp_loading_xml
nologging as
select xml_id,xmltype( q_clob) q_xml
from temp_loading_lob;
XMl Data
<?xml version="1.0" encoding="ISO-8859-1" ?>
<Root xmlns="http://www.w3.org/2000/10/XMLSchema">
<Accounts ApplicationVersion="7.2.1.6 (10-02-2012)" Database="Q" DateExported="20120813">
<Account AccountID="QF8AA000">
<AccountName>124 On Brunswick Bed & Breakfast</AccountName>
<Addresses>
<Address AddressID="aQF8AA000YMY">
<Description>Physical</Description>
<Address1>124 Brunswick Drive</Address1>
<Address2>Brunswick Park - RD 4</Address2>
<Address3></Address3>
<Suburb></Suburb>
<City>Rotorua</City>
<Postcode></Postcode>
</Address>
<Address AddressID="aQF8AA000WXX">
<Description>Postal</Description>
<Address1>PO Box 7365</Address1>
<Address2></Address2>
<Address3></Address3>
<Suburb>Te Ngae</Suburb>
<City>Rotorua</City>
<Postcode>3042</Postcode>
</Address>
</Addresses>
</Accounts>
</Account>
</Root>
Query used to reterive data
select po.*
from temp_loading_xml p,
XMLTable('/Accounts/Account'
PASSING p.q_xml
COLUMNS
AccountID varchar2(20) PATH '@AccountID'
,AccountName varchar2(20) PATH 'AccountName'
)poi am trying to catch my error but unable to fix it. Any help will ge greatly appretiated. How can i close my thread?
Best Regards,
Zaid>
<Root xmlns="http://www.w3.org/2000/10/XMLSchema">
<Accounts ApplicationVersion="7.2.1.6 (10-02-2012)" Database="Q" DateExported="20120813">
<Account AccountID="QF8AA000">
</Accounts>
</Account>
</Root>
>
must be
<Root xmlns="http://www.w3.org/2000/10/XMLSchema">
<Accounts ApplicationVersion="7.2.1.6 (10-02-2012)" Database="Q" DateExported="20120813">
<Account AccountID="QF8AA000">
</Account>
</Accounts>
</Root>and add namespaces to xmltable
32 select po.*
33 from temp_loading_xml p,
34 XMLTable(
35 xmlnamespaces(default 'http://www.w3.org/2000/10/XMLSchema')
36 ,'Root/Accounts/Account'
37 PASSING p.q_xml
38 COLUMNS
39 AccountID varchar2(20) PATH '@AccountID'
40 ,AccountName varchar2(20) PATH 'AccountName'
41 )po
42 /
ACCOUNTID ACCOUNTNAME
QF8AA000 124 On Brunswick Bed
SQL> -
Populating selectboxes in form by retrieving data from oracle table
hi guys...im a student .......i was thinking if someone could help me out.
i am woking on a project which is being built using JSP with EL.(jstl)
My problem is.......i have 2 interdependent select boxes in my form,which are CATEGORY and SUB CATEGORY. I could populate the first select box dynamically by extracting the values from the database table CATEGORYDATATABLE as foll:
<sql:query var="q1" sql="select distinct(type) from catgorydatatable"/>
<select name=selectbox1>
<c:forEach var="a" items="${q1.rows}">
<option>${a.type}</option>
</c:forEach>
</select>
but the problem poped up when i tried to populate the second select box which is the subcategory.
ie for example
**if i select category as STUDENT from the first select box the second one should get populated with a of all student names......
**on selecting category as Employee in first select box i should get to see all employee names in second select box and these names are to be extracted from the table.
i tried the following code but it isnt working:
<sql:query var=q2 sql="select subtype from categorydatatable where type=${param.selectbox1}"/>
<select name=selectbox2>
<c:forEach var=b items="${q2.rows}"/>
<option>${b.subtype}</option>
</select>
please do help me with this.....i'd be very thankful on recieving a sample code on this
thank u....
shireeesha>
After installing the ODAC package, I can now see a list of new drivers., including:
1) Oracle in OraClient11g_home1This one is the one you installed when you installed the Oracle client.
2) Oracle in XEThis one was installed when you installed XE on the system.
Which one should I chose? I would have expected a Oracle Client in XE. Is there another ODAC package for the Express edition? I could not find any.I'd use the first one, though I don't use XE so have no experience with it. They're probably the same or very similar clients in this case.
When I get into the Oracle ODBC Driver Configuration, it asks me for:
TNS Service Name
However, the dropdown box appears empty. Could you provide me a pointer on how to continue with the TNS Service name?There is a bug with the 32 bit driver that makes the dropdown always empty. You can just type the name in.
Of course, that means you need to know the name. XE may have set that up for you already. Go to where you installed XE and look for a tnsnames.ora file, typically in the \network\admin folder. If your local database is set up there, you can copy that file to the same place in the other Oracle client's installation folder (\network\admin), and then type in the TNS name (that's the name before all the stuff in brackets).
If there isn't one already set up, you'll have to create it and for XE I honestly have no idea how to do that. My DBA does it for all our databases. :) -
How to extract data from Oracle Table to an Oracle XMLtype field
All,
I'm very new with ODI and I'm looking for a way to implement the following scenario:
I have the Oracle table A, already mapped to Data Model A. This table has the following fields:
field X (PK)
field Y
field Z
field W
I have a table B, already mapped to Data Model B. This table has the following fields:
field X (PK)
field V (XMLType)
I want to extract the data from Table A to a XML file with the following structure:
<X> yada yada yada </X>
<Y> yada yada yada </Y>
<Z> yada yada yada </Z>
<W> yada yada yada </W>
and then insert this file into the field V of Table B. How can I do that?
TIA,
RodrigoYou can use UDConnect to get from Oracle database in to BW
<b>Data Transfer with UD Connect -</b>
http://help.sap.com/saphelp_nw04/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/content.htm
<b>Prerequisites</b>
You have installed the SAP WAS J2EE Engine with BI Java components. You can find more information on this in the SAP BW installation guide on the SAP Service Marketplace at service.sap.com/instguides.
Hope it Helps
Chetan
@CP.. -
How to load data from oracle table to XML using ODI ?
Hello Team
I am trying to load data from an oracle table to an xml file. I have configured the physical and the logical schemas for the same. I have used SQL to SQL as LKM and SQL to SQL Append as IKM with Sunopsis Memory Engine as staging area.
After this, when I am executing the interface, it is executed without any errors but to my surprise I am not finding the relevant data in the xml file. What could be the reason ?
Please look into this and lemme know how to solve it.
Thanks.908458 wrote:
Hello Phanikanth
Even IKM SQL Control Append is not solving the problem. There are many " order columns" in the target xml table. I have not mapped them or specified any order. Does the problem persist because of this ?
Thanks
Manoj
Ocle to XML file loading issue in ODI 10.1.3.5 -
Import data from Oracle table into flat file
How to import the data in the oracle table into flat file using UTL File of PL/SQL....
I am new in PL/SQL..
can someone help me in writing query?Note : Not Tested.
DECLARE
V1 VARCHAR2(32767);
F1 UTL_FILE.FILE_TYPE;
cursor c1 is select ename,empno from emp;
r_c1 c1%rowtype;
BEGIN
-- In this example MAX_LINESIZE is less than GET_LINE's length request
-- so the number of bytes returned will be 256 or less if a line terminator is seen.
open c1;
F1 := UTL_FILE.FOPEN('MYDIR','MYFILE','W',256);
loop
fetch c1 into r_c1;
v1:= r_c1.ename||''||To_char(r_c1.empno);
UTL_FILE.PUT_LINE (F1, v1,TRUE);
v1:= null;
Exit when c1%not found;
end loop;
UTL_FILE.FCLOSE(F1);
END;
http://download.oracle.com/docs/cd/B19306_01/appdev.102
------------------------------------------------------------------
Maybe you are looking for
-
How to create and maintain a backup catalog on a separate hd - separate from default location of the catalog?
-
New Itunes wont work!!! :-(
I dont know whats going on, when i opened itunes it said that there was a new update and i was all like ya!!!....Not any more!!! When i was downloading the quick times part there was some errar and it said i could debug. so i did and everthing was fi
-
New chat groups not showing up in client
i have skype installed on my mac and, apparently, I was added to a few new converstations. I am not seeing any of the messages in my client though. No new group popped up in the left hand bar. Individual conversations are still working and old chat g
-
Ho would i know that liquidity items were mapped with G/L accounts
Hi Experts, I would like to know how the liquidity values are mapped to theG/L accounts. Ex : L 75 Investments is the value in LQPOS liquidity item and the correspond table is FLQLPOS. So i would like to know how the L75 investment is mapped to the G
-
I need to use subscripts and superscripts for buttons. I can do this with HTML but am also open to doing this with attribute sets using the Document.insertString interface. My question is whether there is a static method to globally set the font (I n