Oracle BLOB value to a variable of LC
Hello
Is it possible to LC ES2 to force oracle blob value to a variable in livecycle?
During the mapping of results of the sql query (type BLOB columns) to a variable of LC (of type of Document), we get:
com.adobe.workflow.datatype.InvalidCoercionException: can not compel object: type oracle.sql.BLOB@27e7d6: oracle.sql.BLOB type: com.adobe.idp.Document
We tried mapping string, binary, Document (we even desperately sql.oracle.BLOB hardcoded in the XML process), but none of it works.
It is possible to solve this another way, then follows?
http://groups.Google.com/group/LiveCycle/browse_thread/thread/6c4b9156b52b71a7
Thank you.
My idea is to recover data from BLOB column as UTF8 (base64) string encoded and then use getDocumentFromBase64 available in the ES2.
I don't know what syntax is to retrieve Oracle.
I used the MySql database and run the query:
SELECT CONVERT (with the HELP of tbl_nameSET UTF8) as MyBlobDataAsBase64Str myTableName;
Now, using SetValue activity to look like: myXMLvariable = getDocumentFromBase64 (strVariableHoldingBase64Data)
This case works perfectly without any problems.
---------------
The problem is you should find the appropriate for ORACLE syntax.
I was searching on the functions of CONVERT() & UNISTR() . But I'm unable to assess.
Try for yourself...
Nith
Tags: Adobe LiveCycle
Similar Questions
-
How to insert the value of the variable using select statement - function Oracle
Hello
I have a function that inserts the record based on a condition
INSERT IN the case
(
Case_ID,
Case_Status,
Closure_Code,
Closure_Date
)(
SELECT newCaseID,
caseStatus,
Closure_Code,
Closure_Date,
CASE
WHERE Case_ID = caseID
);
Now, I want the new value casestatus instead of value caseStatus select statement. I have a m_caseStatus variable and I want to use the value of this variable in the select statement above.
How can I use this.
Thank youINSERT INTO Case ( Case_ID, Case_Status, Closure_Code, Closure_Date )( SELECT newCaseID, m_caseStatus, <-- here place your variable Closure_Code, Closure_Date, FROM Case WHERE Case_ID = caseID );
Nicolas.
-
Gettting ODI-17511: no value to the variable. ?
Hi all
I am facing an error when executing a Package to load all dishes unique to Oracle DB folder files.
The thing is that I am able to load data but it's operator error display "no value to the variable ' MULTI_DEMO." "File_name'"
Details of my project are:
PROJECT_NAME: MULTI_DEMO
Name of the interface: MULTI_TEST
Have 5 text files in my folder of the source code. and the target is created as the same schema as the source
variables: filename, County, Files_Count
statement = file_name
DataType: alphanumeric
Keep history: last value
Request used:
SELECT FILE_NAME FROM (SELECT FILE_NAME, SRC_FILE_DETAILS RN ROWNUM)
WHERE RN =' #MULTI_DEMO.count '
statement = count
Data type: digital
Keep a history: last value
Request used: nothing
statement = Files_Count
Data type: digital
Keep a history: last value
Request used: select count (*) in SRC_FILE_DETAILS
I have clearly chosen patterns appropriate for the two variables with queries.
in the Package diagram:
step 1: count = 1 assign (type: set variable) {-> File_Name and failure success: END}
step 2: filename (type: Refresh variable) {-> multi_test success and failure: END}
step 3: multi_test (type: flow (interface)) {success-> count and failure: END}
step 4: count increment = 1 (type: set variable) {success-> Files_Count and failure: END}
step 5: Files_Count (type: Refresh variable) {success-> count and failure: END}
step 6: County (type: evaluate the variable) is operator " > = " value is "MULTI_DEMO.count" {success-> File_Name and failure: END}
Please find below the picture for flow diagram
I have changed the stage names, hope you find my reviews.
Please help me to sort out this error.
I use OBIEE 11.1.1.9
The error is in short:
java.lang.Exception: ODI-17511: no value to the variable ' MULTI_DEMO. File_name'.
at oracle.odi.runtime.agent.execution.sql.RefreshVariableExecutor.execute(RefreshVariableExecutor.java:70)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.processTask(SnpSessTaskSqlV.java:410)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2637)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.treatTask(SnpSessTaskSqlV.java:240)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:380)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:312)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:304)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:874)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:133)
to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:84)
at java.lang.Thread.run(Thread.java:662)
I repeat, "I am able to load data but always error in the last step.
Thanks a mllion.
Shakur
-
How to display the value of the variable for bottom of pl/sql
How to display the value of the variable for bottom of pl/sql
declare
V_1 number: = 10;
V_2 number: = 20;
V_3 number: = 30;
v_4 number: = 40;
v_5 number: = 50;
test varchar2 (100);
Start
I'm in 1.5
loop
test: = "v_" | I have;
dbms_output.put_line(i||) e > ' | test);
end loop;
end;
/
How to get below output:
1 > v_1
2 > v_2
3 > v_3
4 > v_4
5 > v_5
But I want to output of
1 > 10
2 > 20
3 > 30
4 > 40
5 > 50
Hello
You cannot reference variables as you did and get the value of the variable. Use pretty collection.
set serveroutput on size 2000 declare type number_table is table of number; numbers number_table := number_table(10, 20, 30, 40, 50); begin for i in numbers.first .. numbers.last loop dbms_output.put_line(i || '->' || numbers(i)); end loop; end; / anonymous block completed 1->10 2->20 3->30 4->40 5->50
See the Collections of PL/SQL and Records http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#LNPLS005
-
Reg exp to divide the values of the variables
Hello all, I use Oracle 11.2 of SOE, the value of the variable C is: numberA:numberB for example, C: = ' 1 B: 5 A: 12 has: B: 43 3A ", I have divided than the values of two Variables A and B with the letters of withdrawal and replacement of: for the comma. Namely, the value of each would be: is: 5,12,43 B is: 1.3 someone could help to come up with the correct Exp Reg for this task. Thanks in advance.
Here's a way (like SQL or PL/SQL):
with t (Spercu))
Select "1 B: 5 A: 12 A: B: 43 3A ' double
)
Select Spercu
, regexp_replace (regexp_replace (regexp_replace(strC||':','\d+B:'),' A:$ '), ':', ',') as strA
, regexp_replace (regexp_replace (regexp_replace(strC||':','\d+A:'),' B:$ '), 'B:', ',') as strB
;SPERCU STRA, STRB
---------------- -------- ------
1 B: 5 A: 12 A: B: 43 3A 1.3 5,12,43or
declare
varA varchar2 (30);
varB varchar2 (30);
varC varchar2 (30): = ' 1 B: 5 A: 12 A: B: 43 3A;
Start
varA: = regexp_replace (regexp_replace (regexp_replace(varC||':','\d+B:'),' A:$ '), ':', ',');
varB: = regexp_replace (regexp_replace (regexp_replace(varC||':','\d+A:'),' B:$ '), 'B:', ',');
dbms_output.put_line (Vara);
dbms_output.put_line (varB);
end;
anonymous block filled
5,12,43
1, 3Replace it after you add a trailing colon varC, Interior removes all the ' nB: "Vara and all the" nA: "from varB. The Middle replace deletes the pair of colon final letter, and replace external converts the other pairs of commas leter-colon.
Kind regards
Bob -
How to apply the procedure inside a procedure and the evils of the value in a variable?
Hi all
I'm usung oracle 11g.
Here is my package and procedure
I want to call get_email_details this procedure within the process_email_master and store the value in a variable in main proceedings
create or replace
PACKAGE ms_gen_process_email
as
type email_type is rendered (subject varchar2 (4000 tank),
email_body varchar2 (4000 tank),
to_receipent varchar2 (4000 tank),
cc_receipent varchar2 (4000 char));
type email_type_table is table of the email_type;
procedure process_email_master)
p_metric_name IN VARCHAR2,
p_current_stage in varchar2,
p_action in varchar2,
p_pid number,
P_OBJECT_ID in varchar2
-p_emai_master on p_email_type_table
);
PROCEDURE get_email_details)
p_metric_name IN VARCHAR2,
p_current_stage in varchar2,
P_ACTION in varchar2,
p_email_type_table1 on email_type_table
) ;
END ms_gen_process_email;
----
create or replace
PACKAGE ms_gen_process_email BODY
as
procedure process_email_master)
p_metric_name IN VARCHAR2,
p_current_stage in varchar2,
p_action in varchar2,
p_pid number,
p_object_id in varchar2
)
as
Start
null;
EXCEPTION
WHILE OTHERS
then
null;
end process_email_master;
PROCEDURE get_email_details)
p_metric_name IN VARCHAR2,
p_current_stage IN VARCHAR2,
P_ACTION in varchar2,
p_email_type_table on email_type_table
)
as
BEGIN
Select the object, email_body, to_receipent, cc_receipent
bulk collect into p_email_type_table
of ms_gen_email_config_detail
WHERE email_key =)
SELECT email_key
OF ms_gen_email_config
WHERE metric_name = p_metric_name
AND action p_action =
and current_stage = p_current_stage
);
for me in p_email_type_table.first... loop of p_email_type_table. Last
dbms_output.put_line (p_email_type_table (i) reserve .under | p_email_type_table (i) .email_body: p_email_type_table (i) .to_receipent: p_email_type_table (i) .cc_receipent);
end loop;
EXCEPTION
WHILE OTHERS
THEN
NULL;
END get_email_details;
END ms_gen_process_email;
but I get this error message
Error (15,31): PLS-00201: identifier 'P_EMAIL_TYPE_TABLE' must be declared
Concerning
Dale
See below the test case and change your code. You can call the procedure in detail within a main as procedure below
CREATE or REPLACE PACKAGE test_pkg AS
TYPE rec_val IS RECORD (empno, emp.empno%TYPE,
Ename emp.ename%TYPE
);
TYPE nt_tabtest IS TABLE OF THE rec_val;
PROCEDURE get_email_id (p_type to nt_tabtest);
PROCEDURE get_email_master;
END;
/
CREATE or REPLACE PACKAGE test_pkg BODY
AS
PROCEDURE get_email_id (p_type ON nt_tabtest)
AS
BEGIN
SELECT EmpNo, ename COLLECT in BULK in p_type FROM emp;
END;
PROCEDURE get_email_master
AS
v_type nt_tabtest;
BEGIN
get_email_id (v_type);
BECAUSE me IN v_type. FIRST... v_type. LAST
LOOP
DBMS_OUTPUT. Put_line (v_type (i) .empno: v_type (i) .ename);
END LOOP;
END;
END;
/
Post edited by: 000000
-
Hi allI use below the procedure to add the BLOB values. But I will affect the values added in a variable. HOW?
CREATE OR REPLACE PROCEDURE Example_1b IS
-Note that the FOR UPDATE clause is blocking the line
WHERE key_value = 12 FOR UPDATE;
DBMS_LOB. APPEND (dest_lob, src_lob);
Kind regards
Fame
do you need this?
SQL > declare
2 dest_lob BLOB;
3 src_lob blob.
4 BEGIN
5 dbms_lob.createtemporary (dest_lob, TRUE);
6 because me in)
7B SELECT FROM t1 loop)
8 DBMS_LOB. Append(dest_lob,i.b);
9 end of the loop;
10 dbms_output.put_line (utl_raw.cast_to_varchar2 (dest_lob));
11 END;
12
13.
testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttes
ttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest
PL/SQL procedure successfully completed
SQL >
----
Ramin Hashimzade
-
Write the blob value in a file
Hi all
I'm looking on the correct method of writing a blob value to a file. I know the best way to use an external language. For example, Java or C. But also, I met a number of solutions to do within pl/SQL block. All of them look like this:
CREATE OR REPLACE PROCEDURE Write_Binary_file
(
PC$ Directory IN VARCHAR2
, PC$ file_name IN VARCHAR2
, PC$ SQL_Order IN VARCHAR2
, PB$ Raise IN DEFAULT BOOLEAN FALSE
)
-- -------------------------------------------
-Procedure to empty a BLOB column in a file
-- -------------------------------------------
-settings:
-PC$ Directory: name of an existing directory of Oracle
-PC$ file_name: name of the file output expected
-PC$ SQL_Order: SQL command to select the BLOB column
-PB$ Raise: boolean to indicate if the process
-would be stopped after an error
--
IS
src_lob BLOB;
RAW buffer (16384).
AMT directory: = 16384;
INTEGER POS: = 1;
LF$ FicOUT UTL_FILE. TYPE_DE_FICHIER;
LC$ Msg VARCHAR2 (2000);
BEGIN
-get the BLOB column-
BEGIN
EXECUTE IMMEDIATE PC$ SQL_Order IN src_lob;
EXCEPTION
WHEN NO_DATA_FOUND THEN
LC$ Msg: = ' Write_Binary_File(): NO_DATA_FOUND';
If PB$ increase THEN
RAISE_APPLICATION_ERROR (-20100, LC$ Msg);
END IF;
Dbms_Output.put_line(LC$MSG);
RETURN;
END;
-Open the output file-
LF$ FicOUT: = UTL_FILE. FOPEN (Directory$ PC, PC$ filename, 'W', 32764);
-write the file-
LOOP
-play songs-
Dbms_Lob.read (src_lob, amt, pos, buffer);
-write the songs-
Utl_File.Put_Raw (LF$ FicOut, buffer);
POS: = pos + amt;
END LOOP;
-Close the file-
Utl_File.fclose(LF$FicOut);
EXCEPTION
WHEN NO_DATA_FOUND THEN
UTL_FILE.fclose(LF$FicOut);
WHILE OTHERS THEN
LC$ Msg: = ' error Write_Binary_File(): ' | TO_CHAR (SQLCODE) | "everything by managing the file (')"
|| PC$ Directory | ') ' || PC$ file_name;
If PB$ increase THEN
RAISE_APPLICATION_ERROR (-20100, LC$ Msg);
END IF;
Dbms_Output.put_line(LC$MSG);
END Write_Binary_file;
/
But this code doesn't seem to work. The problem is that it always creates a slightly bigger than an initial file. So copy jpg will never be opened with any viewer.
Can someone explain this problem and give no work around?
Thank youHello
If I look at this procedure, I think that you forget to check if the last part, it takes to read is less than 32000. Now you put the always full buffer to the desired quantity. The last part, you only need to read from the BLOB what remains, nothing more. By reading more, get your blob of larger than expected.
I use the package lie on this page for several years and no complains: http://www.adp-gmbh.ch/blog/2005/november/20.html
Herald tiomela
http://htendam.WordPress.com -
Value of the variable in the method Validation
Dear all
I have a validation method to validate the att in my impl class, contains the String Variable, How to display the value of this Variable in my error message for this method of validation?
Thank you
Published by: Oracle itself on March 8, 2011 22:45You can use tokens in your error message.
Check this box:
http://download.Oracle.com/docs/CD/E12839_01/Web.1111/b31974/bcvalidation.htm#CACDJGCF -
How to give a value to a variable that is defined by the user for the use in my statement
Hai All
I declared a variable
declare
In_time varchar2 (25);
out_time varchar2 (25);
then I wrote a so other logic and this is my encoding
Start
go_block ('TEST_SRI');
PREMIER_ENREGISTREMENT;
LOOP
If: bartime between 0145 and then 0630
Update dail_att set = outtime: bartime where barcode =: bar code
and ATTEND_DATE =: BARDATE-1 and in_time is set to null and out_time is not null;
elsif: bartime between 0630 and 0900 or: bartime between 1130 and 1230 or
: bartime between 1700 and 1800 and in_time is null then
insert into dail_att(barcode,intime,attend_date)
values(:Barcode,:Bartime,:bardate);
elsif: bartime > 1645 and t_in is not null and out_time is null then
Update dail_att set = outtime: bartime where barcode =: bar code
and ATTEND_DATE =: BARDATE and respondent are not null and outtime has the value null.
I need to know how can I give the values of these variables if I use the variable in my statement
If it is possible by using the slider Pls tell me the steps to solve my problem
and while I will carry out my loop it get only half of my files what is wrong.
Concerning
Srikkanth.MYour question seems to relate to Oracle Forms, which has its own forum of OTN.
But as it comes to PL/SQL I will make a comment... Unfortunately this comment is that in reading your post, I don't know what you're asking.
You wrote: "I need to know how can I give the values of these variables if I use the variable in my statement.
What variable? Why don't you use a duty with: = as you obviously already know how to do?
An example would be very useful.
PS: Always display product names and version numbers.
-
How can we give the values of the variable
Oracle Forms6i
Hai All
I'm generating a daily presence on the teams. In what I wrote an ifelse condition it work successfully and but he gets only 350 line on 800.
I declared a variable and I need to know how to assign values to the variable Pls tell the steps to follow. I did it correctly, but there is a logic error in my code. Let give me a few steps to solve the problem
My code is
declare
t_in varchar2 (25);
t_out varchar2 (25);
cursor cur_test is
Select * from dail_att where intimate = t_in and outtime = t_out;
-in t_in, t_out dail_att;
Start
loop
go_block ('TEST_SRI');
PREMIER_ENREGISTREMENT;
If: bartime between 0145 and then 0630
Update dail_att set = outtime: bartime where barcode =: bar code
and ATTEND_DATE =: bardate-1 and intimate are zero and outtime is not null;
elsif: bartime between 0630 and 0900 or: bartime between 1130 and 1230 or
: bartime between 1700 and 1800 and t_in is null then
insert into dail_att(barcode,intime,attend_date)
values(:Barcode,:Bartime,:bardate);
elsif: bartime > 1645 and t_in is not null and t_out is null then
Update dail_att set = outtime: bartime where barcode =: bar code
and ATTEND_DATE =: BARDATE and respondent are not null and outtime has the value null.
end if;
WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE" OR: BAR CODE IS NULL;
NEXT_RECORD;
END LOOP;
forms_ddl ('commit');
exception
while others then
forms_ddl ('rollback');
message(SQLERRM|| dbms_error_Text);
message(SQLERRM|| dbms_error_Text);
end;
Concerning
Srikkanth.Muse you make of your variables t_in and t_out I guess you want before loading with the values they have in the current row of the cursor... I tried to offer you a way to assign a value to your [another post | http://forums.oracle.com/forums/thread.jspa?threadID=1019382&tstart=15]... see if this helps
Kind regards
Luca
-
How to display a value constant and variable
Hello
I'm trying to display a variable in sql the line of command and oracle xe object browser. Here is a small code to assign a value to a variable of an existing column name id that has value 4567 plane of the table. I'm a newbie, so forgive my ignorance:
Report the number of new_num;
Start
Select code in new_num of aircraft where id = 4567;
end;
/
Issues related to the:
1. something wrong with the code?
2. How can I he discovers via sql more command line?
3. can I see it in Oracle XE gui object browser?
Kind regards
ValerieDbms_output.put_line ();
declare new_num number; begin select id into new_num from airplane where id=4567; dbms_output.put_line('new_num:'||new_num); end; /
-
Using the calculation script to write the value of the variable Substitution in a file
Hello
I am trying to use the calculation script to write the value of Substitution variable in a text file.
I use the dataexport command. But it is not able to write values in the text file.
Any help is appreciated.
Thank you.MaxL would display variable. See: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/dispvarb.htm
BTW, I mostly prefer Esscmd MaxL. I think that makes me a heretic, but I don't understand why I don't want to type more rather than less to get the same result.
Running a calc:
Esscmd - RUNCALC 2 calcname
MaxL - run calculation Sample.Basic.calcname;To be fair, Esscmd requires a dbname appname SELECT before the RUNACALC, but it is always less striking.
However, time is running, so I don't have too. And of course, MaxL now has many things that Esscmd doesn't like Esscmd is obsolete.
I always use Esscmd to run scripts of calc I can actually watch the output in real time as opposed to MaxL that exports the console at the end of execution.
Kind regards
Cameron Lackpour
-
value of the variable 'keep '.
Hello world!!
An applescript noob here!
I'm trying to create a script using Automator to "find and replace" name of my client always in the same file in Textedit, so I can use this text by only to replace every time the name of the customer. (as a model)
So far, I got this:
display dialog "which is the name of your client?" default answer «»
Set cst_name to text returned of the result
dialogue box "are you sure you want to change it?
Global customer
the value customer cst_name
Tell application "TextEdit".
-Find and replace
the value of each word in the document before where it = 'CSTX' to the customer
tell the end
My problem here is, of course, when the text 'CSTX' changed once using the scrip he is not called CSTX more, but the name I just enter in the dialog box guests.
Is there a way to 'keep' the value of this variable so I can run this script as often I do.
Do you guys think that this is an easier solution for this?
THX in advance!
If the first instance of it will always be in the same place of the document each time, you can get it with:
Tell application "TextEdit".
Words from 5 to 5 of 1
tell the end
(142371)
-
How to set the value of a variable in automator?
I'm totally new to automator I found a post that I try to reuse
to Re: copy multiple files from TextEdit in one Word file
I want to open a series of html files in a folder and convert in a TextEdit rtf file.
However, I am unable to automator find out how set the value of a variable such that it appears in this post
I looked at every command in library without a lot of fortune
Any help?
Thank you
Dan
Its in Utilities.
In Automator, use the search box:
Maybe you are looking for
-
I currently have 10.7.5 Why can't upgrade to El Capitan
I have 10.7.5 I am having trouble upgrading to El Capitan
-
Unable to view Microsoft Power Point programs
I have a new Vista Home Basic - installed the Powerpointviewer.exe and am still unable to view the Power Point slideshows. Any help would be greatly appreciated. Thank you!
-
P7 - 1519C does not accept the video card...
Ok. Looking to replace the video in a P7 - 1519C. A caught an ATI 7770, using a Thermaltake 500W PSU. Machine comes on. Turns off quickly thereafter. Then it finally boots. Get the driver installed in Windows, restart... Just long beeps. So, I tho
-
Client AnyConnect VPN 2.3
When I run the application, how do I do not see other menus to drop as documented? Install it wrong? I do not see options for: Group Username Password Am I suppose to not see these yet? Thank you
-
Factory of blackBerry Smartphones or default reset.
Anyone know how can I factory reset and remove all my information from my Pearl. Thank you