Extract tables from "Oracle Apss 11.0.3" and load it to "Oracle Apps 11i"
Hi hussein,
I am tasked to extract the following tables from Oracle Apps 11.0.3 and load it to Oracle Apps 11.5.10.2.
PO_VENDORS
PO_VENDOR_SITES_ALL
Can I use export / import?
Thanks a lot
Hi,
I believe export/import of individual apps tables is not supported due to objects dependency and refrential integrity.
Regards,
Hussein
Similar Messages
-
Extraction of data from Planning and load it into Oracle/SQL server (RDBMS)
Hi All,
ODI can extract data from Oracle/SQL server RDBMS and load it into Hyperion planning, but I wanted to know if it is possible to extract data from Hyperion Planning through ODI and load it into Oracle or SQL server RDMBS i.e the other way round.
Kindly let me know if that is possible or not,If yes then please let me know what is the exact process to achieve this through ODI.
Thanks & Regrads,
GurpreetYes this can be done. Remember that Planning data is actually stored in Essbase so the Knowledge module you will need to use is LKM Essbase to SQL (DATA)
-
Open an Excel file to read and load it into Oracle - Oracle COM Automation
Hello All,
Please I need your help for this problem:
I need to load Excel sheet data (read the data) and load it into Oracle database (insert into a table), the excel file created and has data before, and saved with xls format. and I need to do that using the Oracle® COM Automation (ordcom package). The examples I found open and create a new workbook and deletes the old saved data, so I need to open (edit) the sheet just for reading.
I appreciate ans sample code to help me do that, Please help me out. This is very urgent.
Thanks alot and best regards,
NabilFor reading from Excel, there are some easy ways like Oracle Heterogenious Services. If you want to use COM then:
My orawpcom.dll file exists in the directory C:\oracle\product\10.2.0\db_2\bin
C:\oracle\product\10.2.0\db_2\bin>dir orawpco*.dll
Volume in drive C is C_Drive
Volume Serial Number is 8A93-1441
Directory of C:\oracle\product\10.2.0\db_2\bin
03/20/2006 05:06 PM 61,440 orawpcom.dll
10/11/2006 03:20 PM 81,920 orawpcom10.dll
2 File(s) 143,360 bytes
0 Dir(s) 65,407,717,376 bytes free
C:\oracle\product\10.2.0\db_2\bin>Information about my database version.
SQL> /* My databaser version */
SQL> SELECT * FROM v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
SQL> Preparing the user SCOTT for COM automation.
Now, I will run comwrap.sql from scott user. I have edited the comwrap.sql to adjust my library path here:
create library utils_lib as 'C:\oracle\product\10.2.0\db_3\bin\orawpcom.dll';Running comwrap.sql and ExcelSolution.sql .....
SQL> conn scott@orclsb
Enter password: *****
Connected.
SQL> @c:\comwrap.sql
drop library utils_lib
ERROR at line 1:
ORA-04043: object UTILS_LIB does not exist
Library created.
drop package ORDCOM
ERROR at line 1:
ORA-04043: object ORDCOM does not exist
drop TYPE OAArgTable
ERROR at line 1:
ORA-04043: object OAARGTABLE does not exist
Type created.
drop TYPE OAArgTypeTable
ERROR at line 1:
ORA-04043: object OAARGTYPETABLE does not exist
Type created.
drop function OAgetNumber
ERROR at line 1:
ORA-04043: object OAGETNUMBER does not exist
Function created.
drop function OAgetStr
ERROR at line 1:
ORA-04043: object OAGETSTR does not exist
Function created.
drop function OAgetBool
ERROR at line 1:
ORA-04043: object OAGETBOOL does not exist
Function created.
drop function OAsetNumber
ERROR at line 1:
ORA-04043: object OASETNUMBER does not exist
Function created.
drop function OAsetString
ERROR at line 1:
ORA-04043: object OASETSTRING does not exist
Function created.
drop function OAsetBoolean
ERROR at line 1:
ORA-04043: object OASETBOOLEAN does not exist
Function created.
drop function OAInvokeDouble
ERROR at line 1:
ORA-04043: object OAINVOKEDOUBLE does not exist
Function created.
drop function OAInvokeBoolean
ERROR at line 1:
ORA-04043: object OAINVOKEBOOLEAN does not exist
Function created.
drop function OAInvokeString
ERROR at line 1:
ORA-04043: object OAINVOKESTRING does not exist
Function created.
drop function OACreate
ERROR at line 1:
ORA-04043: object OACREATE does not exist
Function created.
drop function OADestroy
ERROR at line 1:
ORA-04043: object OADESTROY does not exist
Function created.
drop function OAGetLastError
ERROR at line 1:
ORA-04043: object OAGETLASTERROR does not exist
Function created.
drop function OAQueryMethods
ERROR at line 1:
ORA-04043: object OAQUERYMETHODS does not exist
Function created.
Package created.
Package body created.
SQL>
SQL> @c:\ExcelSolution.sql
drop package ORDExcel
ERROR at line 1:
ORA-04043: object ORDEXCEL does not exist
Package created.
Package body created.
SQL>
I have modified ORDExcel a little bit and renamed it as ORDExcelSB. You need this version for reading the excel.
SQL> @C:\ExcelSolutionSB.sql
Package dropped.
Package created.
Package body created.
SQL> The actual code of ORDExcelSB (ExcelSolutionSB.sql) Is:
set serveroutput on;
drop package ORDExcelSB;
CREATE PACKAGE ORDExcelSB AS
/* Declare externally callable subprograms. */
FUNCTION CreateExcelApplication(servername VARCHAR2) RETURN binary_integer;
FUNCTION OpenExcelFile(filename VARCHAR2, sheetname VARCHAR2) RETURN binary_integer;
FUNCTION CreateExcelWorkSheet(servername varchar2) return binary_integer;
FUNCTION InsertData(range varchar2, data binary_integer, type varchar2) return binary_integer;
FUNCTION InsertDataReal(range varchar2, data double precision, type varchar2) return binary_integer;
FUNCTION GetDataNum(range varchar2) return binary_integer;
FUNCTION GetDataStr(range varchar2) return varchar2;
FUNCTION GetDataReal(range varchar2) return double precision;
FUNCTION GetDataDate(range varchar2) return date;
FUNCTION InsertData(range varchar2, data varchar2, type varchar2) return binary_integer;
FUNCTION InsertData(range varchar2, data Date, type varchar2) return binary_integer;
FUNCTION InsertChart(xpos binary_integer, ypos binary_integer, width binary_integer,
height binary_integer, range varchar2, type varchar2) return binary_integer;
FUNCTION SaveExcelFile(filename varchar2) return binary_integer;
FUNCTION ExitExcel return binary_integer;
END ORDExcelSB;
CREATE PACKAGE BODY ORDExcelSB AS
DummyToken binary_integer;
applicationToken binary_integer:=-1;
WorkBooksToken binary_integer:=-1;
WorkBookToken binary_integer:=-1;
WorkSheetToken binary_integer:=-1;
WorkSheetToken1 binary_integer:=-1;
RangeToken binary_integer:=-1;
ChartObjectToken binary_integer:=-1;
ChartObject1 binary_integer:=-1;
Chart1Token binary_integer:=-1;
i binary_integer;
retNum binary_integer;
retReal double precision;
retStr varchar2(255);
retDate DATE;
error_src varchar2(255);
error_description varchar2(255);
error_helpfile varchar2(255);
error_helpID binary_integer;
FUNCTION CreateExcelApplication(servername VARCHAR2) RETURN binary_integer IS
BEGIN
dbms_output.put_line('Creating Excel application...');
i := OrdCOM.CreateObject('Excel.Application',
0,
servername,
applicationToken);
IF (i != 0) THEN
ORDCOM.GetLastError(error_src,
error_description,
error_helpfile,
error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
dbms_output.put_line('Invoking Workbooks...');
i := ORDCOM.GetProperty(applicationToken,
'WorkBooks',
0,
WorkBooksToken);
IF (i != 0) THEN
ORDCOM.GetLastError(error_src,
error_description,
error_helpfile,
error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
RETURN i;
END CreateExcelApplication;
FUNCTION OpenExcelFile(filename VARCHAR2, sheetname VARCHAR2)
RETURN binary_integer IS
BEGIN
dbms_output.put_line('Opening Excel file ' || filename || ' ...');
ORDCOM.InitArg();
ORDCOM.SetArg(filename, 'BSTR');
i := ORDCOM.Invoke(WorkBooksToken, 'Open', 1, DummyToken);
IF (i != 0) THEN
ORDCOM.GetLastError(error_src,
error_description,
error_helpfile,
error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
dbms_output.put_line('Opening WorkBook');
i := ORDCOM.GetProperty(applicationToken,
'ActiveWorkbook',
0,
WorkBookToken);
IF (i != 0) THEN
ORDCOM.GetLastError(error_src,
error_description,
error_helpfile,
error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
dbms_output.put_line('Invoking WorkSheets..');
i := ORDCOM.GetProperty(applicationToken,
'WorkSheets',
0,
WorkSheetToken1);
IF (i != 0) THEN
ORDCOM.GetLastError(error_src,
error_description,
error_helpfile,
error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
dbms_output.put_line('Invoking WorkSheet');
ORDCOM.InitArg();
ORDCOM.SetArg(sheetname, 'BSTR');
i := ORDCOM.GetProperty(WorkBookToken, 'Sheets', 1, WorkSheetToken);
IF (i != 0) THEN
ORDCOM.GetLastError(error_src,
error_description,
error_helpfile,
error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
dbms_output.put_line('Opened ');
RETURN i;
END OpenExcelFile;
* Invoke the Excel Automation Server and create a Workbook object as
* well as a worksheet object
FUNCTION CreateExcelWorkSheet(servername varchar2) return binary_integer IS
BEGIN
dbms_output.put_line('Creating Excel application...');
i:=ORDCOM.CreateObject('Excel.Application', 0, servername,applicationToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
dbms_output.put_line('Invoking Workbooks...');
/*i:=ORDCOM.Invoke(applicationToken, 'WorkBooks',0, WorkBooksToken);*/
i:=ORDCOM.GetProperty(applicationToken, 'WorkBooks', 0, WorkBooksToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
dbms_output.put_line('Invoking Add to WorkBooks...');
ORDCOM.InitArg();
ORDCOM.SetArg(-4167,'I4');
i:=ORDCOM.Invoke(WorkBooksToken, 'Add', 1, WorkBookToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
dbms_output.put_line('Invoking WorkSheets..');
ORDCOM.InitArg();
ORDCOM.SetArg('Sheet 1','BSTR');
/* i:=ORDCOM.Invoke(applicationToken, 'WorkSheets', 1, WorkSheetToken);*/
i:=ORDCOM.GetProperty(applicationToken, 'WorkSheets', 0, WorkSheetToken1);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.Invoke(WorkSheetToken1, 'Add', 0, WorkSheetToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
return i;
END CreateExcelWorkSheet;
* Invoke the Range method to obtain a range token. Then set the property value
* at the specified range to the data required
FUNCTION InsertData( range varchar2,
data binary_integer,
type varchar2)
RETURN binary_integer IS
BEGIN
ORDCOM.InitArg();
ORDCOM.SetArg(range, 'BSTR');
i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.SetProperty(RangeToken, 'Value', data, type);
IF (i=0) THEN
i:=ORDCOM.SetProperty(RangeToken, 'ColumnWidth', 15, 'I2');
END IF;
i:=ORDCOM.DestroyObject(RangeToken);
RETURN i;
END InsertData;
* Invoke the Range method to obtain a range token. Then set the property value
* at the specified range to the data required
FUNCTION GetDataNum( range varchar2)
RETURN binary_integer IS
BEGIN
ORDCOM.InitArg();
ORDCOM.SetArg(range, 'BSTR');
i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.GetProperty(RangeToken, 'Value', 0, retNum);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.DestroyObject(RangeToken);
RETURN retNum;
END GetDataNum;
FUNCTION GetDataReal( range varchar2)
RETURN double precision IS
BEGIN
ORDCOM.InitArg();
ORDCOM.SetArg(range, 'BSTR');
i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.GetProperty(RangeToken, 'Value', 0, retReal);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.DestroyObject(RangeToken);
RETURN retReal;
END GetDataReal;
FUNCTION GetDataStr( range varchar2)
RETURN varchar2 IS
BEGIN
ORDCOM.InitArg();
ORDCOM.SetArg(range, 'BSTR');
i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.GetProperty(RangeToken, 'Value', 0, retStr);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.DestroyObject(RangeToken);
RETURN retStr;
END GetDataStr;
FUNCTION GetDataDate( range varchar2)
RETURN Date IS
BEGIN
ORDCOM.InitArg();
ORDCOM.SetArg(range, 'BSTR');
i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.GetProperty(RangeToken, 'Value', 0, retDate);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.DestroyObject(RangeToken);
RETURN retDate;
END GetDataDate;
FUNCTION InsertData( range varchar2,
data DATE,
type varchar2)
RETURN binary_integer IS
BEGIN
ORDCOM.InitArg();
ORDCOM.SetArg(range, 'BSTR');
i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
i:=ORDCOM.SetProperty(RangeToken, 'Value', data, type);
i:=ORDCOM.DestroyObject(RangeToken);
RETURN i;
END InsertData;
FUNCTION InsertDataReal( range varchar2,
data double precision,
type varchar2)
RETURN binary_integer IS
BEGIN
ORDCOM.InitArg();
ORDCOM.SetArg(range, 'BSTR');
i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
i:=ORDCOM.SetProperty(RangeToken, 'Value', data, type);
i:=ORDCOM.DestroyObject(RangeToken);
RETURN i;
END InsertDataReal;
FUNCTION InsertData( range varchar2,
data varchar2,
type varchar2)
RETURN binary_integer IS
BEGIN
ORDCOM.InitArg();
ORDCOM.SetArg(range, 'BSTR');
i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
i:=ORDCOM.SetProperty(RangeToken, 'Value', data, type);
i:=ORDCOM.DestroyObject(RangeToken);
RETURN i;
END InsertData;
* Insert a chart at the x and y position of the spreadsheet with the desired
* height and width. Then also uses the ChartWizard to draw the graph with data
* in a specified range area with a specified charting type.
FUNCTION InsertChart(xpos binary_integer, ypos binary_integer,
width binary_integer, height binary_integer,
range varchar2, type varchar2) RETURN binary_integer IS
charttype binary_integer:= -4099;
BEGIN
ORDCOM.InitArg();
i:=ORDCOM.GetProperty(WorkSheetToken, 'ChartObjects', 0, ChartObjectToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
ORDCOM.InitArg();
ORDCOM.SetArg(xpos,'I2');
ORDCOM.SetArg(ypos,'I2');
ORDCOM.SetArg(width,'I2');
ORDCOM.SetArg(height,'I2');
i:=ORDCOM.Invoke(ChartObjectToken, 'Add', 4, ChartObject1);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.GetProperty(ChartObject1, 'Chart', 0,Chart1Token);
ORDCOM.InitArg();
ORDCOM.SetArg(range, 'BSTR');
i:=ORDCOM.GetProperty(WorkSheetToken,'Range', 1, RangeToken);
ORDCOM.InitArg();
ORDCOM.SetArg(RangeToken, 'DISPATCH');
IF type='xlPie' THEN
charttype := -4102;
ELSIF type='xl3DBar' THEN
charttype := -4099;
ELSIF type='xlBar' THEN
charttype := 2;
ELSIF type='xl3dLine' THEN
charttype:= -4101;
END IF;
ORDCOM.SetArg(charttype,'I4');
i:=ORDCOM.Invoke(Chart1Token,'ChartWizard', 2, DummyToken);
i:=ORDCOM.DestroyObject(RangeToken);
i:=ORDCOM.DestroyObject(ChartObjectToken);
i:=ORDCOM.DestroyObject(ChartObject1);
i:=ORDCOM.DestroyObject(Chart1Token);
RETURN i;
END InsertChart;
* Save the Excel File. WARNING: Do not specify a filename that already exist
* since there is no graphical context, Oracle would not be able to pop
* out a warning message for existing file. This causes Excel to hang
FUNCTION SaveExcelFile(filename varchar2) return binary_integer IS
BEGIN
dbms_output.put_line('Saving Excel file...');
ORDCOM.InitArg();
ORDCOM.SetArg(filename,'BSTR');
i:=ORDCOM.Invoke(WorkBookToken, 'SaveAs', 1, DummyToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
RETURN i;
END SaveExcelFile;
* Close the Excel spreadsheet and exit from it
FUNCTION ExitExcel return binary_integer is
BEGIN
dbms_output.put_line('Closing workbook and quitting...');
ORDCOM.InitArg();
ORDCOM.InitArg();
ORDCOM.SetArg(FALSE,'BOOL');
dbms_output.put_line('Closing workbook...');
i:=ORDCOM.Invoke(WorkBookToken, 'Close', 0, DummyToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.DestroyObject(WorkBookToken);
ORDCOM.InitArg();
dbms_output.put_line('Closing workbooks...');
i:=ORDCOM.Invoke(WorkBooksToken, 'Close', 0, DummyToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.DestroyObject(WorkBooksToken);
i:=ORDCOM.Invoke(applicationToken, 'Quit', 0, DummyToken);
IF (i!=0) THEN
ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
dbms_output.put_line(error_src);
dbms_output.put_line(error_description);
dbms_output.put_line(error_helpfile);
END IF;
i:=ORDCOM.DestroyObject(WorkSheetToken);
i:=ORDCOM.DestroyObject(WorkSheetToken1);
i:=ORDCOM.DestroyObject(applicationToken);
i:=ORDCOM.DestroyObject(ChartObjectToken);
i:=ORDCOM.DestroyObject(Chart1Token);
i:=ORDCOM.DestroyObject(ChartObject1);
i:=ORDCOM.DestroyObject(dummyToken);
RETURN i;
END ExitExcel;
END ORDExcelSB;
/I have created an excel named as C:\Example.xls.
Name SlNo Job Dept Salary Bonus
Saubhik Banerjee 706090 IT Specialist GBS 100 10
Partha S Mohanty 706091 Pogrmmer APPS 70 20
Partha Sarkar 889300 Condultant FIN 200 30
Useless 98009 PM PM 900 90
SQL> SET SERVEROUT ON
SQL> DECLARE
2
3 v_Name varchar2(90);
4 v_SlNo varchar2(100);
5 v_Job varchar2(200);
6 v_Dept varchar2(100);
7 v_recon_remark varchar2(50);
8 v_sal_amt_usd number;
9 v_Bonus_amt_usd number;
10
11 result INTEGER;
12
13 i binary_integer;
14 filename varchar2(255);
15
16 BEGIN
17
18 filename := 'C:\Example.xls';
19
20 result := ORDExcelSB.CreateExcelApplication('');
21 result := ORDExcelSB.OpenExcelFile(filename, 'Sheet1');
22
23 /* Excluding the header row and reading the first 5 row */
24 FOR n in 2 .. 5 LOOP
25
26 v_Name := ORDExcelSB.GetDataStr('A' || n);
27 v_SlNo := ORDExcelSB.GetDataReal('B' || n);
28 v_Job := ORDExcelSB.GetDataStr('C' || n);
29 v_Dept := ORDExcelSB.GetDataStr('D' || n);
30 v_sal_amt_usd := ORDExcelSB.GetDataNum('E' || n);
31 v_Bonus_amt_usd := ORDExcelSB.GetDataNum('F' || n);
32
33 dbms_output.put_line(v_Name || ' ' || v_SlNo || ' ' || v_Job || ' ' ||
34 v_Dept || ' ' || v_sal_amt_usd || ' ' ||
35 v_Bonus_amt_usd);
36
37 END LOOP;
38
39 result := ORDExcelSB.ExitExcel();
40 EXCEPTION
41 WHEN OTHERS THEN
42 result := ORDExcelSB.ExitExcel();
43 RAISE;
44 END;
45 /
Creating Excel application...
Invoking Workbooks...
Opening Excel file C:\Example.xls ...
Opening WorkBook
Invoking WorkSheets..
Invoking WorkSheet
Opened
Saubhik Banerjee 706090 IT Specialist GBS 100 10
Partha S Mohanty 706091 Pogrmmer APPS 70 20
Partha Sarkar 889300 Condultant FIN 200 30
Useless 98009 PM PM 900 90
Closing workbook and quitting...
Closing workbook...
Closing workbooks...
PL/SQL procedure successfully completed.
SQL> Although, You haven't asked, but you can use this code to write to excel file (.xls)
DECLARE
CURSOR c1 IS
SELECT empno, ename, dname, sal, hiredate
FROM emp e, dept d
WHERE e.deptno = d.deptno;
error_message varchar2(1200);
n binary_integer:=2;
i binary_integer;
filename varchar2(255);
cellIndex varchar2(40);
cellValue varchar2(40);
cellColumn varchar2(10);
returnedTime varchar2(20);
currencyvalue double precision;
datevalue DATE;
empno binary_integer;
looptext varchar2(20);
error_src varchar2(255);
error_description varchar2(255);
error_helpfile varchar2(255);
error_helpID binary_integer;
begin
filename:='c:\example2.xls';
i:=ORDExcel.CreateExcelWorkSheet('');
i:=ORDExcel.InsertData('A1', 'EmpNo', 'BSTR');
i:=ORDExcel.InsertData('B1', 'Name', 'BSTR');
i:=ORDExcel.InsertData('C1', 'Dept', 'BSTR');
i:=ORDExcel.InsertData('D1', 'Salary', 'BSTR');
i:=ORDExcel.InsertData('E1', 'HireDate', 'BSTR');
For c1_rec IN c1 LOOP
cellColumn:=TO_CHAR(n);
cellIndex:=CONCAT('A',cellColumn);
cellValue:=TO_CHAR(c1_rec.empno);
empno:=cellValue;
i:=ORDExcel.InsertData(cellIndex, empno, 'I2');
cellIndex:=CONCAT('B',cellColumn);
cellValue:=c1_rec.ename;
i:=ORDExcel.InsertData(cellIndex, cellValue, 'BSTR');
cellIndex:=CONCAT('C',cellColumn);
cellValue:=c1_rec.dname;
i:=ORDExcel.InsertData(cellIndex, cellValue, 'BSTR');
cellIndex:=CONCAT('D',cellColumn);
cellValue:=c1_rec.sal;
currencyValue:=cellValue;
i:=ORDExcel.InsertData(cellIndex, currencyValue, 'CY');
cellIndex:=CONCAT('E',cellColumn);
dateValue:=c1_rec.hiredate;
i:=ORDExcel.InsertData(cellIndex, dateValue, 'DATE');
n:=n+1;
END LOOP;
i:=ORDExcel.SaveExcelFile(filename);
i:=ORDExcel.ExitExcel();
EXCEPTION
WHEN OTHERS THEN
i:=ORDExcel.ExitExcel();
RAISE;
END; -
when i want to sign in apple id in icloud from setting , appear a black page and loading .... help me ...
Hello shlomi2890,
To resolve your issue, you would need to change the Apple ID back to what you had originally, sign out and then change it back. Check out the article below for more information.
iOS 7: If you're asked for the password to your previous Apple ID when signing out of iCloud
http://support.apple.com/kb/TS5223
Change your Apple ID temporarily
If signing out and back in to iMessage or FaceTime didn't help, try these steps:
Change your Apple ID to the Apple ID you used previously. You shouldn't need to verify the email address.
Go to Settings > iCloud. Complete these steps only if the Find My [Device] setting is turned on:
Scroll down and tap Delete Account, then tap Delete to confirm.
Tap “Keep on My [Device]” or “Delete from My [Device].” In either case, your data remains in iCloud and will be updated on your device when you sign in to iCloud again.
Enter the password for your previous Apple ID.
Change your Apple ID to the new email address that you want to use. You'll need to verify the email address.
Return to Settings > iCloud and sign in with your new Apple ID.
Regards,
-Norm G. -
Im switching from iPhone 5 toXperia Z3 D6616 and no notes The Notes app in Iphone
i switched from iPhone 5 toXperia Z3 D6616 and no notes The Notes app in Iphone
first i guess a need an app for android that is compalabe with notes, but what one i see a lot of them but wading through the garbage is soooooo time consuming.
when i di the transfer i get the message No notes transfered, Every thing else transfered fine
D6603 On AT&T Running Android 4.4.4 Build 23.0.1.A.5.77
Solved!
Go to Solution.back4now2 wrote:
i switched from iPhone 5 toXperia Z3 D6616 and no notes The Notes app in Iphone
first i guess a need an app for android that is compalabe with notes, but what one i see a lot of them but wading through the garbage is soooooo time consuming.
when i di the transfer i get the message No notes transfered, Every thing else transfered fine
HI I will suggest you to use the Xperia Transfer feature to help transfer most of your data from your iphone to the Xperia Z3, that should also include your notes to be transfered.
Aside from that, the notes app for Xperia for some country will preload with scatch or Google Keep and some with both. Just take note of that.
Hope this helps to resolve your concern.
Regards.
I can accept failure.... I can't accept not trying - Michael Jordan -
How to extract table from oracle in to delimited flat files
Hi i have the following requirement.i tried one dump procedure but i could extract table one by one.i need to do extract on regular basis using plsql procedure.
Data will be extracted from production tables in Oracle into pipe delimited flat files that will be sent by SFTP. The list below represents the tables that will be used for extract along with a notation whether the entire table is extracted or only incremental transactional data.
Table name extraction type No of records
EXPIRE All Records 157 - One Time All Records 17
ACE All Records 7,970
DATA All Records 5,868
MEMBER All Records 24,794,879
MEMBER Incremental & Update 13,893,587 (Initial Load)
MEMBERRED All Records 25,108,606
MEMBERPOINT All Records 42,487,640
MEMBERCOM Incremental & Update 14,337,561 (Initial Load)
MEMBERCODE Incremental Only 14,985,568 (Initial Load)
MEMBERDETAIL Incremental Only 14,341,890 (Initial Load)
MEMBERHISTORY Incremental Only 70,021,067 (Initial Load)
suggest me how can i extract these tables by using plsql procedure.In the above table some table has be extract select list of column.Saubhik wrote:
This may help you.
Re: Dynamic Fetch on dynamic Sql
Well I was going to post my standard response, but I see I don't have to. ;) -
Dear All,
I am newbie to oracle, my company wants to export few tables from 9.2.0.2 database to 10.2.02. ( they are using developer 2000 4.5/ and oracle reports 6i)
The puropose of this activity is to use forms and reports of 9i into 10g to check if it works.
The configuration of Test machine is core2duo processor, 2gb ram, 500gb hard disk.
I have few questions, as i am newbie am little afraid, so please help me,
what are the precautions i have to make before running export command on 9i database?
What are teh precautions i have to make before running import command on 10g database?
My manager wants me too export it with user,synonyms,grants,priveleges as it is production database? how to do that?
How to check what are the grants and privileges of a users in 9i?
My production database is on 9i and on solaris 10 i am going to install 10g database on windows xp as test instance, is it correct to do this way??
My manager said i should use NLS_LANG as AMERICAN_AMERICA.AR8MSWIN1256 as a character set while installing database.
Note:- I have installed oracle 10g from OTN.
Please help me as early as possible.
Regards,
user9007339No, that it doesn't mean. You will have to use the exact right version at the right time. From lower version to higher you need to use source db exp tool and target db imp. From higher to lower you need to use target db exp and target db imp.
In other words:
Always use exp from lowest version and imp from target version!
See Metalink, Note:132904.1 -
Cache and Load Balancing with Oracle APEX Listener
Hi,
I intend to use only HTTP access.
How to implement a Cache and Load Balancing with the Oracle APEX Listener?
Is it possible to do with the the standalone running APEX Listener?
Thanks by advance for any tips/documentation/references.
Kind Regards.Hi,
I think this question is best asked in the APEX Listener forum:
ORDS, SODA & JSON in the Database
Kind regards
Sandro -
Cache and Load Balancing for Oracle APEX Listener
Hi,
I intend to use only HTTP access.
The database I use is Oracle11gR2 SE 32bit.
How to implement a Cache and Load Balancing with the Oracle APEX Listener?
Is it possible to do with the the standalone running APEX Listener?
Thanks by advance for any tips/documentation/references.
Kind Regards.Error. To be closed.
-
What can Extract Tables from PDF
Hi All,
I have a bunch of PDF docs with tabular data in them which I need to extract to process and run calculations on.
Is there anything out in the world (preferablly free, open source) that is able to get tabluar data out of PDFs into a more readable format in bulk either natively integrated with an app or passively via command line or looping the process in code?
Can be any format really just as long as the tables are maintained.
Anything I've found so far is either a one-off (only does one pdf at a time) or does not maintain the table structure (only extracts simple, unstructured text)
Any ideas please post.This is a forum to discuss the actual PDF format and not product recommendations.
-
I would like to open a URL and extract tables from the HTML code of the web
Hi I have opened a URL say www.amazon.com and I would like to extract te tables in that particular web page would somebody out there help me with the code so that the output file displays only the relevant tables containing books and its prices dropping out all other data on the web page . My code for opening the URL goes here. Any quick help would be appreciated
import java.net.*;
import java.io.*;
class ConnectionTest {
public static void main(String[] args) {
try {
URL amazon = new URL("http://www.amazon.com");
URLConnection amazonConnection = amazon.openConnection();
DataInputStream dis = new DataInputStream(amazonConnection.getInputStream());
String inputLine;
while ((inputLine = dis.readLine()) != null) {
System.out.println(inputLine);
dis.close();
} catch (MalformedURLException me) {
System.out.println("MalformedURLException: " + me);
} catch (IOException ioe) {
System.out.println("IOException: " + ioe);
}The quick and dirty way ( Not perfect and will be prone to errors ) :
As you read the lines using readLine(), look for the string "<table>" (Perhaps using String.indexOf ? -- Java API for class String -- http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html)
If the start tag is found, start dumping lines into a String (string concatenation), keep doing it until you find the end tag, using the method mentioned.
Also, you may want to consider the case where <table> or </table> may not be at the beginning of the line, so you may want to use String.substring to selectively extract part of the line that you want to keep.
Oh, and don't assume that the <table> tag is in lower case, and don't forget that there may be other attributes that are defined in the start and end tags.
I wouldn't recommend using this method other than a quick and dirty extraction. If you really want to do things the right way, use a HTML parser or use the Amazon Web Services as paulcw suggested.
Amazon Web Services:
http://aws.amazon.com -
Can Oracle Portal read data from an access DB and loaded it an Oracle DB?
Hi All.
Does Oracle Portal provides a portlet to read data from an access db so that i can transfer it to my Oracle DB?.
I believe Application Express does that .... Any portlet maybe ...?
Regards, Luis ...!There are portlets that read from a DB to make reports, you can try to create a form portlet so you can make inputs to the database, no buil-in like you wish, has to be done manually.
greetings. -
Want to open an Excel file and load it into Oracle - Oracle COM Automation
I'm doing some test and I got the following errors in the dbms output:
Creating Excel application...
COM-0004: The registered CLSID for the ProgID is invalid.
Invoking Workbooks...
COM-0004: The registered CLSID for the ProgID is invalid.
Invoking Add to WorkBooks...
COM-0002: Invalid Token or no interface for token
I tried to register the orawpcom10.dll on the server but I could not.
I changed the orawpcom10.dll file for a newer one, but I got the same error.
I tried to google the error messages, but I did not find any solution.
Could you give me any idea?
Thanks again,
Javier
Edited by: 882807 on 01-sep-2011 6:01Sorry, I was a little bit busy at work. You can see my answers below:
1. Post your database version from v$version.
SQL> 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 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL>2. The path where orawpcomxx.dll stored (preferably with dir command from command prompt).
C:\oracle\product\10.2.0\db_1\BIN>dir orawpco*.dll
El volumen de la unidad C no tiene etiqueta.
El número de serie del volumen es: E0C2-001B
Directorio de C:\oracle\product\10.2.0\db_1\BIN
22/06/2010 17:40 81.920 orawpcom10.dll
1 archivos 81.920 bytes
0 dirs 31.090.524.160 bytes libres
C:\oracle\product\10.2.0\db_1\BIN>3. Definition (CREATE statement) of UTILS_LIB
create library utils_lib as 'C:\oracle\product\10.2.0\db_1\BIN\orawpcom10.dll';4. Relevant portion of TNSNAMES.ora and LISTNER.ora.
TNSNAMES.ORA
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)LISTENER.ORA
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vsdwh1.AD.SMS.CARM.ES)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
...5. Status (valid/invalid) of ORDExcelSB from all/dba/user_objects.
SQL> select object_name,object_type,status from all_objects where object_name =
'ORDEXCELSB';
OBJECT_NAME OBJECT_TYPE STATUS
ORDEXCELSB PACKAGE VALID
ORDEXCELSB PACKAGE BODY VALID
SQL>6. How you are calling and the actual error (copy paste from SQL prompt).
SQL> SET SERVEROUT ON
SQL> DECLARE
2 v_Name varchar2(90);
3 v_SlNo varchar2(100);
4 v_Job varchar2(200);
5 v_Dept varchar2(100);
6 v_recon_remark varchar2(50);
7 v_sal_amt_usd number;
8 v_Bonus_amt_usd number;
9 result INTEGER;
10
11 i binary_integer;
12 filename varchar2(255);
13 BEGIN
14
15 filename := 'C:\Example.xls';
16
17 result := ORDExcelSB.CreateExcelApplication('');
18 result := ORDExcelSB.OpenExcelFile(filename, 'Sheet1');
19
20 /* Excluding the header row and reading the first 5 row */
21 FOR n in 2 .. 5 LOOP
22
23 v_Name := ORDExcelSB.GetDataStr('A' || n);
24 v_SlNo := ORDExcelSB.GetDataReal('B' || n);
25 v_Job := ORDExcelSB.GetDataStr('C' || n);
26 v_Dept := ORDExcelSB.GetDataStr('D' || n);
27 v_sal_amt_usd := ORDExcelSB.GetDataNum('E' || n);
28 v_Bonus_amt_usd := ORDExcelSB.GetDataNum('F' || n);
29
30 dbms_output.put_line(v_Name || ' ' || v_SlNo || ' ' || v_Job || ' ' ||
31 v_Dept || ' ' || v_sal_amt_usd || ' ' ||
32 v_Bonus_amt_usd);
33
34 END LOOP;
35
36 result := ORDExcelSB.ExitExcel();
37 EXCEPTION
38 WHEN OTHERS THEN
39 result := ORDExcelSB.ExitExcel();
40 RAISE;
41 END;
42 /
Creating Excel application...
COM-0004: The registered CLSID for the ProgID is invalid.
Invoking Workbooks...
COM-0004: The registered CLSID for the ProgID is invalid.
Opening Excel file C:\Example.xls ...
COM-0002: Invalid Token or no interface for token
Opening WorkBook
COM-0002: Invalid Token or no interface for token
Invoking WorkSheets..
COM-0002: Invalid Token or no interface for token
Invoking WorkSheet
COM-0002: Invalid Token or no interface for token
Opened
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
0 0 0
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
0 0 0
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
0 0 0
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
0 0 0
Closing workbook and quitting...
Closing workbook...
COM-0002: Invalid Token or no interface for token
Closing workbooks...
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
PL/SQL procedure successfully completed.
SQL>Thanks again for your interest.
Javier -
It seems that recent additions to my iTunes library are not available for download to my (or my son's) iphone - other albums by the same artist are available.
Any help is appreciated...Audiobooks (and ringtones) are currently a one-time only download from the store. If you don't have it on a backup of your downloads then you can try contacting iTunes support and see if they will grant you a re-download : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
-
Upgraded from I-Phone 3 to 4 and can't get the apps on.
I have just upgraded from an I-phone 3 to a 4 how do I get all the apps transferred over I have connected to itunes and updated all the apps that had available updates but still they wont go on.
Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact
Maybe you are looking for
-
Help with looping and counting
i am in a CS 1 class and need help with this loop /*Write a program that will allow the user to enter a character until the capital letter Z is entered The program should count the number of letters entered and print the tota
-
Variable based on another varable does not change at runtime
Hi. I have Foreach Loop container with a EXEC SQL task inside. The Foreach Loop loops through a directory containing flat files and and maps the filename to a "FileName" variable. The filenames have a datestamp in the filename that I want to extract.
-
Hello, I am newbie ... facing what seems like a daunting task. We have a set of api's - the output of the methods that I am interested in comes in the form of either Vector or Hashtable. I want to write a thin layer on top of the existing api's to co
-
Does Aperture recognize RAW shots taken on your new RICOH GR DIGITAL?
Who else is having issues with Aperture not recognizing RAW files created with their new RICOH GR DIGITAL camera? Aperture has apparently been designed for photographers if you believe the advertising....but obviously not ones that know life's little
-
Hi, We have the below requirement in 11i: When there is a mass addition, there should be an option to assign accounting code combinations at a category or setup level so that it defaults to all items on a divisional accounting basis. This is to enabl