Problem in Loading data for clob column using sql ldr
Hi,
I am having problem in loading data for tables having clob column.
Could anyone help me in correcting the below script for ctrl file inorder to load the data which is in mentioned format.
Any help really appreciated.
Table Script
Create table samp
no number,
col1 clob,
col2 clob
Ctrl File
options (skip =1)
load data
infile 'c:\1.csv'
Replace into table samp
fields terminated by ","
trailing nullcols
no,
col1 Char(100000000) ,
col2 Char(100000000) enclosed by '"' and '"'
Data File(1.csv)
1,asdf,"assasadsdsdsd""sfasdfadf""sdsdsa,ssfsf"
2,sfjass,"dksadk,kd,ss""dfdfjkdjfdk""sasfjaslaljs"
Error Encountered
ORA-01461: can bind a LONG value only for insert into a LONG column
Table sampThanks in advance
I can't reproduce it on my 10.2.0.4.0. CTL file:
load data
INFILE *
Replace into table samp
fields terminated by ","
trailing nullcols
no,
col1 Char(100000000) ,
col2 Char(100000000) enclosed by '"' and '"'
BEGINDATA
1,asdf,"assasadsdsdsd""sfasdfadf""sdsdsa,ssfsf"
2,sfjass,"dksadk,kd,ss""dfdfjkdjfdk""sasfjaslaljs"Loading:
SQL> Create table samp
2 (
3 no number,
4 col1 clob,
5 col2 clob
6 );
Table created.
SQL> host sqlldr scott/tiger control=c:\temp\samp.ctl log=c:\temp\samp.log
SQL> select * from samp
2 /
NO
COL1
COL2
1
asdf
assasadsdsdsd"sfasdfadf"sdsdsa,ssfsf
2
sfjass
dksadk,kd,ss"dfdfjkdjfdk"sasfjaslaljs
NO
COL1
COL2
SQL> SY.
Similar Messages
-
Weird problem with loading data from an XML using a for loop
Hi,
I have a strange problem. I have encountered this thing many a times but still don't know the proper workaround for it.
I am trying to load swf file, a video file or an image. They can be present on a local system or on a remote server also. All the entries corresponding to the files to be loaded is made in an XML file. I traverse through the nodes of the XML using a for loop. On the complete event of loader info, example:.
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
I fill a container with the loaded data.
My problem is when I am using for loop it doesn't works properly but if i use a statement like this:
someFunc()
if(i<arr.length())
... do something...
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
private function onComplete(e:Event):void
... do something...
i++;
All files are loaded properly.
I think this can be because the for loop processes pretty fast but the content takes time to load, which ultimately leads to some wierd results.
Please let me know how can this thing be done correctly by using a for loop also.You don't want to use a for loop to load several items. The way you almost appear to have it is the proper approach... load a file and use the completion of its loading to trigger loading the next file.
-
Hi Guys,
We have a CLOB column in our PNR database with the complete PNR details as below (all information has been changed ):
<PNR><PNR_Body>AXYDFB -ETKT-
REC LOC HDQ1P37EJNM/XAV/24639860/CHI/1P/T/US/USD/GS
HDQ RM 1P 01OCT0000Z
1.1TEST/ONE
1 VS3011N 14DEC SA LHREDI HK1 1950. 2120. 03C*
2 VS3002N 18DEC WE EDILHR HK1 0910. 1040. 03C*
FONE-
1.LHR*[email protected]/N000
2.LHR72582/H530
3.LHR8200144*I24639860 ORBITZ/A877
4.LHR3072582/H415
TKT-T/TBC/CCAX379461823464012/12/72601233655/0001/$
GEN FAX- *TKN/SSR FOR TKT NBRS
1.OSI YY BF0.00 TX141.10 TF141.10 PADT@FSR
2.SSRSEATVSKK1LHREDI3011N14DEC.03CN/RS
3.SSRSEATVSKK1EDILHR3002N18DEC.03CN/RS
4.SSROTHSVSKK1LHREDI3011N14DEC.UNTKTD VS SEGS MAY CANX 141013
5.SSROTHSVSKK1LHREDI3011N14DEC.TKT PER FARE RULES TO AVOID ADM
6.SSROTHSVSKK1EDILHR3002N18DEC.UNTKTD VS SEGS MAY CANX 141013
7.SSROTHSVSKK1EDILHR3002N18DEC.TKT PER FARE RULES TO AVOID ADM
8.SSROTHSVSKK1LHREDI3011N14DEC.UNTKTD VS SEGS MAY CANX 141013
9.SSROTHSVSKK1LHREDI3011N14DEC.TKT PER FARE RULES TO AVOID ADM
10.SSROTHSVSKK1EDILHR3002N18DEC.UNTKTD VS SEGS MAY CANX 141013
11.SSROTHSVSKK1EDILHR3002N18DEC.TKT PER FARE RULES TO AVOID ADM
12.SSROTHSVSKK1LHREDI3011N14DEC.UNTKTD VS SEGS MAY CANX 141013
13.SSROTHSVSKK1LHREDI3011N14DEC.TKT PER FARE RULES TO AVOID ADM
14.SSROTHSVSKK1EDILHR3002N18DEC.UNTKTD VS SEGS MAY CANX 141013
15.SSROTHSVSKK1EDILHR3002N18DEC.TKT PER FARE RULES TO AVOID ADM</PNR_Body><PNR_History>REC LOC AXYDFB7EJNM/XAV/24631260/CHI/1P/T/US/USD/GS
HDQ RM 1P 01OCT0000Z
A3 SSRSEATVSNN1LHREDI3011N14DEC.03C/RS
RCVD-AXYDFB7EJNM/XAV/24612860/CHI/1P/T/US/USD/GS
HDQ RM 1P 01OCT0000Z
X3 SSRSEATVSNN1LHREDI3011N14DEC.03C/RS
A3 SSRSEATVSKK1LHREDI3011N14DEC.03CN/RS
RCVD-
HDQ RM 1P 01OCT0000Z
A3 SSRSEATVSNN1EDILHR3002N18DEC.03C/RS
RCVD-AXYDFB7EJNM/XAV/24612860/CHI/1P/T/US/USD/GS
HDQ RM 1P 01OCT0000Z
X3 SSRSEATVSNN1EDILHR3002N18DEC.03C/RS
A3 SSRSEATVSKK1EDILHR3002N18DEC.03CN/RS
RCVD-
HDQ RM 1P 01OCT0000Z
A3 SSROTHSVSKK1LHREDI3011N14DEC.UNTKTD VS SEGS MAY CANX 142313
A3 SSROTHSVSKK1LHREDI3011N14DEC.TKT PER FARE RULES TO AVOID ADM
A3 SSROTHSVSKK1EDILHR3002N18DEC.UNTKTD VS SEGS MAY CANX 142313
A3 SSROTHSVSKK1EDILHR3002N18DEC.TKT PER FARE RULES TO AVOID ADM
RCVD-VSWEBSERVICE
CRC SU X1 01OCT0001Z D23B06 VS
A3 SSROTHSVSKK1LHREDI3011N14DEC.UNTKTD VS SEGS MAY CANX 142313
A3 SSROTHSVSKK1LHREDI3011N14DEC.TKT PER FARE RULES TO AVOID ADM
A3 SSROTHSVSKK1EDILHR3002N18DEC.UNTKTD VS SEGS MAY CANX 142313
A3 SSROTHSVSKK1EDILHR3002N18DEC.TKT PER FARE RULES TO AVOID ADM
RCVD-VSWEBSERVICE
CRC SU X1 01OCT0001Z AXYDFB VS
A3 SSROTHSVSKK1LHREDI3011N14DEC.UNTKTD VS SEGS MAY CANX 142313
A3 SSROTHSVSKK1LHREDI3011N14DEC.TKT PER FARE RULES TO AVOID ADM
A3 SSROTHSVSKK1EDILHR3002N18DEC.UNTKTD VS SEGS MAY CANX 142313
A3 SSROTHSVSKK1EDILHR3002N18DEC.TKT PER FARE RULES TO AVOID ADM
RCVD-VSWEBSERVICE
CRC SU X1 01OCT0001Z D12B06 VS
A3 SSRTKNEVSHK1LHREDI3011N14DEC-1TEST/ONE.4444123456C1
A3 SSRTKNEVSHK1EDILHR3002N18DEC-1TEST/ONE.4444123456C2
RCVD-AXYDFB7EJNM/XAV/24623860/CHI/1P/T/US/USD/GS
HDQ RM 1P 01OCT0042Z</PNR_History><Seating>SEATS ASSIGNED FLT 3011 14DEC HK1 1950. 2120. X CLASS
B7 * 1TEST/JA LHR TO EDI N 28Z*
NEXT FLIGHT AT EDI FLT 3002 18DEC HK1 0910. 1040. N CLASS
B2 * 1TEST/JA EDI TO LHR N 23D*</Seating><ETicket_Info>AXYDFB -ETKT- CPN FLIGHT DATE CLS FRM TO STATUS ISSUE
1. TEST/ONE 1. VS 3011 14DEC N LHREDI 1P
2. VS 3002 18DEC N EDILHR</ETicket_Info><ETicket_History>TEST/ONE 44443333222211110 $USD 141.10
FP CCAX44443333222211110/9306/142323
CHI 1P RS 01OCT0042Z 999999 VS
***END OF DISPLAY*** </ETicket_History><Fare_Quote>NO FQ DATA EXISTS</Fare_Quote><Fare_History>NO FQ DATA EXISTS</Fare_History><APIS>*NO APIS TO DISPLAY</APIS><Queue_History>SYSQ/IET/00
-Q SSRTKNE 01OCT0042Z </Queue_History></PNR>
Please can somebody suggest how I can browse through each row of the data identify credit card numbers (that we will be doing as per the business requirements from business) mask the numbers and put that back at the orignal location as it was.
Please can somebody explain me considering "44443333222211110" was a credit card number and requires to be masked.
Thanks,
ShazHere's a function you can use on 9i
CREATE OR REPLACE FUNCTION mask_cc_nums(i_clob CLOB)
RETURN CLOB IS
-- function to scan a clob and anywhere it finds a string of 16 consecutive numerics
-- replace then with 16 *'s
v_charpos PLS_INTEGER := 0;
v_outclob CLOB;
v_inlen PLS_INTEGER := dbms_lob.getlength(i_clob);
BEGIN
v_outclob := i_clob;
WHILE v_charpos+16 <= v_inlen LOOP
v_charpos := least(CASE WHEN dbms_lob.instr(v_outclob,'0',v_charpos+1) > 0
THEN dbms_lob.instr(v_outclob,'0',v_charpos+1)
ELSE v_inlen+1
END
,CASE WHEN dbms_lob.instr(v_outclob,'1',v_charpos+1) > 0
THEN dbms_lob.instr(v_outclob,'1',v_charpos+1)
ELSE v_inlen+1
END
,CASE WHEN dbms_lob.instr(v_outclob,'2',v_charpos+1) > 0
THEN dbms_lob.instr(v_outclob,'2',v_charpos+1)
ELSE v_inlen+1
END
,CASE WHEN dbms_lob.instr(v_outclob,'3',v_charpos+1) > 0
THEN dbms_lob.instr(v_outclob,'3',v_charpos+1)
ELSE v_inlen+1
END
,CASE WHEN dbms_lob.instr(v_outclob,'4',v_charpos+1) > 0
THEN dbms_lob.instr(v_outclob,'4',v_charpos+1)
ELSE v_inlen+1
END
,CASE WHEN dbms_lob.instr(v_outclob,'5',v_charpos+1) > 0
THEN dbms_lob.instr(v_outclob,'5',v_charpos+1)
ELSE v_inlen+1
END
,CASE WHEN dbms_lob.instr(v_outclob,'6',v_charpos+1) > 0
THEN dbms_lob.instr(v_outclob,'6',v_charpos+1)
ELSE v_inlen+1
END
,CASE WHEN dbms_lob.instr(v_outclob,'7',v_charpos+1) > 0
THEN dbms_lob.instr(v_outclob,'7',v_charpos+1)
ELSE v_inlen+1
END
,CASE WHEN dbms_lob.instr(v_outclob,'8',v_charpos+1) > 0
THEN dbms_lob.instr(v_outclob,'8',v_charpos+1)
ELSE v_inlen+1
END
,CASE WHEN dbms_lob.instr(v_outclob,'9',v_charpos+1) > 0
THEN dbms_lob.instr(v_outclob,'9',v_charpos+1)
ELSE v_inlen+1
END);
IF v_charpos <= v_inlen-16 AND
TRANSLATE(SUBSTR(v_outclob,v_charpos,16),' 0123456789',' ') IS NULL
THEN
v_outclob := SUBSTR(v_outclob,1,v_charpos-1)||'****************'||SUBSTR(v_outclob,v_charpos+16);
END IF;
END LOOP;
RETURN v_outclob;
END; -
How to have a common value for a column using sql loader
Hi Have a sql loader file which looks like below. But I am not getting how insert the same value for the column in all rows.
id,
crt_user_id
BEGINDATA
1;"system"
2;"system"
3;"system"
So, instead of entering the crt_user_id as system in all rows, can we place the value at the top after the column name?Thanks Srini. your hint/suggestion helped me in finding the solution.
LOAD DATA
INFILE *
BADFILE './TEST.BAD'
DISCARDFILE './TEST.DSC'
APPEND INTO TABLE TEST_TABLE
Fields terminated by ";" Optionally enclosed by '"'
ID,
crt_user_id CONSTANT 'SOME CONSTANT VALUE'
BEGINDATA
1
2
3
so by using CONSTANT key word, we can avoid tying the same value in the data -
How to insert data into BLOB column using sql
Hi all,
How to insert data into BLOB column directly using sql .
create table temp
a blob,
b clob);
SQL> /
Insert into temp values ('32aasdasdsdasdasd4e32','adsfbsdkjf') ;
ERROR at line 1:
ORA-01465: invalid hex number
Please help in this.Thanks,
P Prakashsee this
How to store PDF file in BLOB column without using indirect datastore -
How to load date with time zone using sql loader???
Hi All,
How to load following value in the table using SQL loader.
[11/Jan/2006:15:20:14 -0800]
What should be the datatype of the column in the table. I have tried with "timestamp with local time zone", but unable to load the record using sql loader. What should be the format string in the loader control file to load this type of record.
Any help in this regard is highly appreciated.
SameerTry something like this in your control file:
mycol char "TO_TIMESTAMP_TZ(mycol, 'DD/MON/YYYY:HH24:MI:SS TZH:TZM')"
[pre]
Message was edited by:
Jens Petersen -
Loading data into XMLType column using dbms_xmlsave.insertxml get ORA-29532
The following simple test case succeeded in 9.2.0.1 but failed in 9.2.0.2.
CREATE OR REPLACE procedure InsertXML(xmlDoc IN VARCHAR2, tableName IN VARCHAR2) is
insCtx DBMS_XMLSave.ctxType;
rows number;
begin
insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
dbms_output.put_line(to_char(rows) || ' rows inserted');
DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
end;
CREATE TABLE XMLtable
(column1 xmltype)
exec insertxml('<?xml version = "1.0"?><ROWSET><ROW><COLUMN1><TEST>HELLO</TEST></COLUMN1></ROW></ROWSET>', 'XMLTABLE');Hi,
For your XML file I think you just need to enclose XML elemnts in ROWSET AND ROW TAGS - so xml should look like :
<ROWSET>
<ROW>
<DEPT>
</DEPT>
and just pass it as CLOB to dbms_xmlsave.insertXML proc.
I hope it should work.
I am also trying to insert XML file but with a bit complex structure having multiple nested elements.
I am not sure how to transform the external XML file to wrap it in ROWSET/ROW using XSLT. It's mandatory to use ROWSET/ROW tags to be able to insert in oracle tables. I am facing this problem right now. I am using object views to accomplish the purpose but still needs to figure out the way to apply stylesheet to incoming XML file.
If you come to know of any way, pls do let me know also.
Thanks -
SQL Loader Problem : how to skip column using sql ldr
Hi,
My problme is like this.
In the data file i am getting some data and storing it in flat file format with ` as delimiter.
For example:
t1col1`t1col2`t1col3`t2col1`t2col2`t2col3`t2col4
There are two tables here i.e t1 having 3 columns and t2 having 4 column values.
But in the database i m having only 3 columns for t2 which corresponds to data of t2col3. Now in my control file can i use filler to skip this value in the datafile with the columnName mentioned.
So my basic question is can i get rid of some column value which is there in the datafile and its position is not known when it will come but its name is known and its name is not present in the actual database. Can it be done using keyword "filler".
Any help on this would be highly appreciated.
Eagerly waiting for your reply.
Regards,You will able to find good information about it in this document :
http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96652.pdf
Joel P�rez -
How to Load data for extra columns exist in the dest schema....
Hi Experts,
Please help me.
I need to replicate data from SchemaA to SchemaB.
SchemaB has 3 extra columns. Two are varchar2 type and other is Integer type.
I need to replicate the data from SchemaA to SchemaB in the same database.
When ever i inserted the data in SchemaA, The extra columns should be populated with some default data.
And if we did any update on SchemaA then the extra columns on SchemaB should be populated with other Data.
I wrote some DML_HANDLER but it always populating same data.
I dont know ow to handle this type of situation.
my Handler is:
CREATE OR REPLACE PROCEDURE dml_handler(in_any in sys.anydata)
IS
lcr SYS.LCR$_ROW_RECORD;
rc PLS_INTEGER;
object_owner VARCHAR2(30);
BEGIN
rc := in_any.GETOBJECT(lcr);
object_owner := lcr.GET_OBJECT_OWNER();
IF lcr.get_object_owner() = 'SchemaB' THEN
lcr.add_column('new','SHIP_DATE',sys.anydata.convertvarcahr2('N'));
lcr.add_column('new','SHIP_ZONE',sys.anydata.convertvarchar2('N'));
lcr.add_column('new','SHIP_REACH_BY_DATE',sys.anydata.convertnumber(1));
lcr.EXECUTE(TRUE);
END IF;
END;
BEGIN
DBMS_APPLY_ADM.SET_DML_HANDLER
(object_name => 'SchemaB.TAB_TEST',
object_type => 'TABLE',
operation_name => 'INSERT',
error_handler => FALSE,
user_procedure => 'STRMADMIN.DML_HANDLER');
END;
On extra columns in SChemaB
if its a first insert then the default values are (N,N,1).
If we did any update the values should be (Y,Y,2)
Post any script or give me some idea.
Thanks,
Ray
Edited by: user7423698 on Mar 3, 2009 6:12 PMCREATE OR REPLACE PROCEDURE dml_handler (
in_any IN SYS.ANYDATA
IS
lcr sys.lcr$_row_record;
rc PLS_INTEGER;
cmd_type VARCHAR2 (30);
BEGIN
rc := in_any.getobject (lcr);
cmd_type := lcr.get_command_type;
IF cmd_type = 'INSERT'
THEN
lcr.set_values ('new', lcr.get_values ('new', 'N'));
lcr.add_column ('new', 'type', sys.anydata.convertchar ('I'));
lcr.set_values ('old', NULL);
lcr.add_column ('new', 'time', sys.anydata.converttimestamp (systimestamp));
lcr.execute (TRUE);
END IF;
END;
Set the DML handler for INSERT and write a similar one for UPDATE. -
SQL LOADER: how to load CLOB column using stored function
Hi,
I am a newbie of sql loader. Everything seems to be fine until I hit a
road block - the CLOB column type. I want to load data into the clob
column using a stored function. I need to do some manipulation on the
data before it gets saved to that column. But I got this error when I
run the sql loader.
SQL*Loader-309: No SQL string allowed as part of "DATA" field
specification
DATA is my CLOB type column.
here is the content of the control file:
LOAD DATA
INFILE 'test.csv'
BADFILE 'test.bad'
DISCARDFILE 'test.dsc'
REPLACE
INTO TABLE test_table
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
codeid BOUNDFILLER,
reason BOUNDFILLER,
Checkstamp "to_date(:CHECKSTAMP, 'mm/dd/yyyy')",
"DATA" "GetContent(:codeid, :reason)"
All references are suggesting to use a file to load data on
CLOB column but I want to use a function in which it generates
the content to be saved into the column.
Any help is greatly appreciated.
Thanks,
Baldwin
MISICompany*** Duplicate Post ... Please Ignore ***
-
How to retrive the blob data from a table using sql query
Hi gurus,
I have a table which has " BLOB "content in a column .I want to view the data From BLOB column using sql query .It would be helpfull If some one share their idea.
Regards,
vardhani.You can use data templates.
See this: http://blogs.oracle.com/xmlpublisher/entry/blob_clob_raw_and_looooong
http://blogs.oracle.com/xmlpublisher/entry/inserting_blobs_into_your_repo
Thanks,
Bipuser -
Error while loading data into clob data type.
Hi,
I have created interface to load data from oracle table into oracle table.In target table we have attribute with clob data type. while loading data into clob field ODI gave below error. I use odi 10.1.3.6.0
java.lang.NumberFormatException: For input string: "4294967295"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
Let me know if anyone come across and resolved this kind of issue.
Thanks much,
Nishit GajjarMr. Gajjar,
You didnt mention what KMs you are using ?
have a read of
Re: Facing issues while using BLOB
and
Load BLOB column in Oracle to Image column in MS SQL Server
Try again.
And can you please mark the Correct/Helpful points to the answers too.
Edited by: actdi on Jan 10, 2012 10:45 AM -
Error in loading data into essbase while using Rule file through ODI
Hi Experts,
Refering my previous post Error while using Rule file in loading data into Essbase through ODI
I am facing problem while loading data into Essbase. I am able to load data into Essbase successfully. But when i used Rule file to add values to existing values I am getting error.
test is my Rule file.
com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Cannot put olap file object. Essbase Error(1053025): Object [test] already exists and is not locked by user [admin@Native Directory]
at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:346)
at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2458)
at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
at java.lang.Thread.run(Thread.java:662)
from com.hyperion.odi.common import ODIConstants
from com.hyperion.odi.connection import HypAppConnectionFactory
from java.lang import Class
from java.lang import Boolean
from java.sql import *
from java.util import HashMap
# Get the select statement on the staging area:
sql= """select C1_HSP_RATES "HSP_Rates",C2_ACCOUNT "Account",C3_PERIOD "Period",C4_YEAR "Year",C5_SCENARIO "Scenario",C6_VERSION "Version",C7_CURRENCY "Currency",C8_ENTITY "Entity",C9_VERTICAL "Vertical",C10_HORIZONTAL "Horizontal",C11_SALES_HIERARICHY "Sales Hierarchy",C12_DATA "Data" from PLANAPP."C$_0HexaApp_PLData" where (1=1) """
srcCx = odiRef.getJDBCConnection("SRC")
stmt = srcCx.createStatement()
srcFetchSize=30
#stmt.setFetchSize(srcFetchSize)
stmt.setFetchSize(1)
print "executing query"
rs = stmt.executeQuery(sql)
print "done executing query"
#load the data
print "loading data"
stats = pWriter.loadData(rs)
print "done loading data"
#close the database result set, connection
rs.close()
stmt.close()
Please help me on this...
Thanks & Regards,
ChinnuHi Priya,
Thanks for giving reply. I already checked that no lock are available for rule file. I don't know what's the problem. It is working fine without the Rule file, but throwing error only when using rule file.
Please help on this.
Thanks,
Chinnu -
ORA-22275 inserting into the CLOB column using ODBC input parameters
Hi all,
I'm having problem with INSERT into the CLOB column via bound input parameters.
After calling SQLExecDirect() I'm getting following error:
[Oracle][ODBC][Ora]ORA-22275: invalid LOB locator specified
Adding defaults to the table definitions does not help. If I embed parameter values into the SQL statement - everything works just fine.
I use Oracle 9.2 with latest Oracle ODBC driver 9.2.0.4 under Windows XP.
Any ideas appreciated...
Vlad
Code looks like this:
SQLBindParameter(hstmt,1,...);
SQLBindParameter(hstmt,2,...);
SQLBindParameter(hstmt,3,...);
SQLExecDirect(hstmt,...);
SQL statement looks like this:
insert into tst_table (id,str_fld,clob_fld1,clob_fld2) values (50, ? , ? , ?)
Table looks like this:
CREATE TABLE tst_table (
id number (10,0) NOT NULL ,
str_fld nvarchar2 (50) NOT NULL ,
clob_fld1 nclob NOT NULL ,
clob_fld2 nclob NOT NULL ,
CONSTRAINT PK_tst_table PRIMARY KEY
id
I tried to add defaults to the table, but result is the same:
CREATE TABLE tst_table (
id number (10,0) NOT NULL ,
str_fld nvarchar2 (50) NOT NULL ,
clob_fld1 nclob default EMPTY_CLOB() NOT NULL ,
clob_fld2 nclob default EMPTY_CLOB() NOT NULL ,
CONSTRAINT PK_tst_table PRIMARY KEY
idYou need to provide the data at execution time (i.e. SQL_LEN_DATA_AT_EXEC(0) in the SQLBindParameter followed by a series of SQLPutData calls). If you go to Metalink
Top Tech Docs | Oracle ODBC Driver | Scripts & Sample Code
has some sample code that shows you how to do this.
Justin -
Can we load data for all levels in ASO?
Hi All,
Im creating cube in ASO
can i load data for all levels in ASO
we can load data for all Levels In BSO but in ASO i need confirmation????
and one more
wat is the consider all levels option in ASO is used for ? wat is the purpose?
Can any one help ,it would be appriciate.
ThanksIn an ASO cube you can only load to level zero
The consider all levels if used for aggregation hints. It allows you to tell the aggregation optimizer to look at all levels when deciding if aggregation needs to be done on the dimension
Maybe you are looking for
-
Application Item Not Working as Bind Variable in Region Source
I've created an application variable - APP_AC_CODE - a value for which - PA1 - I set as part of the column link on page A that branches to page B. I use APP_AC_CODE as part of a region title on page B - &APP_AC_CODE. Parameters - which evaluates succ
-
Photo Books - Crop and Color Issues from Kodak Gallery
I've been spending a good amount of time creating photo books and ordering them from Kodak using the built-in online ordering feature. I've noticed several items that I was curious if others have any experience perspective on. 1. Cropping. For a flex
-
Help on report 2.5.5.2.7
Dear All, Request your suggestions please. Here is the set up we have Oracle DB: 9i Oracle Forms version: 4.5.7.1.6 Oracle Reports Version: 2.5.5.2.7 There is a Sales Module fully working and active. After an invoice is raised the user prints the inv
-
Nokia N97 Free Lifetime Navigation
Why there is no lifetime driving license in N97 just like 5800 Navigation Edition. Is someone is paying $600 for a phone then the user should get something for that value. Nokia should consider giving free license just like navigation edition. what d
-
How do I get flash player to work
How do I get flash player to work