I need to read data from a table in SQLSERVER and write to a table in Oracle database directly. Can I do that?
I dont want to PRINT and HOLD the records, instead of that I need to write that directly to the Oracle table.
SQL SQLMSS SET SERVER MASS SQL SQLMSS SELECT * FROM MASS_Application; TABLE FILE SQLOUT PRINT * -****Is there any way to write directly to Oracle table? END -EXITThis message has been edited. Last edited by: Kerry,
Regards, Cyril Joy.
WF Production 8008 on Linux.
August 29, 2008, 12:40 PM
Kamesh
I believe you can do this by writing a stored procedure in SQL Server. Check for OPENQUERY in Sqlserver help. You may get some idea.
Hope it helps, Good Luck.
WFConsultant
WF 8105M on Win7/Tomcat
August 31, 2008, 07:08 PM
Cyril Joy
I got a solution. Thanks!
Regards, Cyril Joy.
WF Production 8008 on Linux.
September 01, 2008, 10:43 AM
Ingas
Cyril,
1. If you just want to create table in Oracle with data, you just need:
TABLE FILE PRINT ....
ON TABLE HOLD AS [your name of table] FORMAT ORACLE PERSISTENCE PERMANENT END
2. If you already have table in Oracle - learn MODIFY.
WF 7.6.2, WinNT/2K, MSSQL 2K, MSOLAP 2K, BID
September 01, 2008, 01:37 PM
Jessica Bottone
Cyril, what was your solution?
Data Migrator 5.3, 7.1, 7.6 WebFOCUS 7.1, 7.6, 7.7 SQL Server, Oracle, DB2 Windows
September 02, 2008, 09:18 PM
Cyril Joy
Following is what I did:
-**********DEFINE THE ORACLE CONNECTION PARAMETERS SET SQLENGINE=SQLORA SQL SET SERVER connection -RUN SQL SET CONNECTION_ATTRIBUTES connection/userid,password -RUN
-*******DEFINE AN ADAPTER FOR SQL SERVER SQL SQLMSS SET SERVER XAP
-*********THE FOLLWING CODE WILL CREATE AN ORACLE TABLE NAMED STG1_ORG_LINKAGE -*********FROM THE SQLSERVER TABLE NAMED ORG_LINKAGE SQL SQLMSS SELECT * FROM ORG_LINKAGE; TABLE FILE SQLOUT PRINT * ON TABLE HOLD AS STG1_ORG_LINKAGE FORMAT ORACLE END
Regards, Cyril Joy.
WF Production 8008 on Linux.
September 02, 2008, 09:22 PM
Cyril Joy
Hi Ingas,
Is it possible to modify/update and existing table?
Regards, Cyril Joy.
WF Production 8008 on Linux.
September 02, 2008, 11:18 PM
Waz
Cyril, you can do this using MODIFY or MAINTAIN
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
September 03, 2008, 03:46 AM
Ingas
quote:
Originally posted by Cyril Joy: Hi Ingas,
Is it possible to modify/update and existing table?
Of course.
1. HOLD way (and "wrong" way)
Step 1. ON TABLE HOLD AS [my temporary table] FORMAT SQLORA Step 2. run SQL SQLORA INSERT INTO [my existing table] SELECT * FROM [my temporary table]; COMMIT; -- I'm not sure, but in Oracle you can COMMIT even if no modifications was done END
2. MODIFY ( "right" way) Cyril, you even do not have to learn MODIFY
Start DataManagement Console, draw your needed data flow, save, and: a) grab an paste it in you report b) EX this flow from your report c) -INCLUDE this flow in your report
WF 7.6.2, WinNT/2K, MSSQL 2K, MSOLAP 2K, BID
September 03, 2008, 08:21 AM
PBrightwell
To modify an existing Oracle table you need to check your access file to be sure that the write permission is set to YES.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes