How to copy one column BLOB value into another column of another database.
How to copy one column BLOB value into another column of another database.
BLOB value contains word document.
I thought of copy the BLOB value into a text file and then update the new column value by the same text in textfile. Will this work?
Is there any other better way to do this?
You're welcome
BLOB fields contains binary data. I don't think you can do this
Also if I view the BLOB as text. Can I copy it and insert into the new database.
I think your options are as I said. Datapump or CTAS
Best Regards
Similar Messages
-
How to Sort one key figure values in two column based on single char
hi gurus,
I would really appreciate if some one can help me out with my question.
I have to design a query based on a Multiprovider built on three ODS, Purchasing, Confirmations & Invoic ODS
Purchase order Value and Number data in PO ODS, and confirmations is in CONFODS, Invoice Values in INV ODS,
The design of the requirement is
Vendor --> PO --> Material PO Value --> Text PO Value --> Confirmation value --> Invoice value
There are Two POS 1. Material PO & 2. Text PO
I need to display all the Purchase orders for a vendor and in different columns i need to display the value of the Material PO and Text PO and their Confirmation Value and how much is the invoiced value for every PO.
Can anybody tell me what should i do in the Query Designer to display the necessary values.
Thank youHi william,
When i put in the PO KF in the column and also the Confirmation KF in other Column it either shows me # for both the entries or it shows me values in only one of the column
if PO is displayed the Confirmation is not displayed and if Confirmation is displayed PO values are shown as # i dont know what wrong i am doing.
if you have idea can you tell me what i should do when i want two different values from two ODS if there are no characteristics that are matching in either of the ODS should i go for Multi Provider and if so how should be my designing. i would really appreciate if you can tell me taking a scenerio.
Thanks -
How to insert an upper value into a column?
Hi!,
I need to insert an upper value into a column.
The data is on a flat file and it could be lowercase or uppercase?
Do I have to create a trigger to solve this problem?
How could the trigger be?
Thanks,
AlexIf you are using SQL*Loader to load the data from flat file into the db table, then you can achieve inserting the UPPER Case of column value in your sqlloader ctl file itself as in below example
LOAD DATA
INFILE *
APPEND INTO TABLE XXX
( field1 position(1:7) char "UPPER(:field1)",
field2 position(8:15) char "UPPER(:field2)"
BEGINDATA
Phil Locke
Jason Durbin
So in this case the Names Phil Locke and Jason Durbin will be inserted as PHIL LOCKE and JASON DURBIN into the target table.
Regards,
Murali Mohan -
Hi, all
I'm looking for the correct method of writing an internal blob value into a file. I know that the best way is using some external language. I.e. Java or C. But also I met a number of solutions of doing 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 BOOLEAN DEFAULT FALSE
-- Procedure to dump a BLOB column onto a file
-- parameters:
-- PC$Directory : name of an existing Oracle Directory
-- PC$File_Name : name of the expected output file
-- PC$SQL_Order : SQL order to select the BLOB column
-- PB$Raise : boolean to indicate if the process
-- would be stopped after an error
IS
src_lob BLOB;
buffer RAW(16384);
amt BINARY_INTEGER := 16384;
pos INTEGER := 1;
LF$FicOUT UTL_FILE.FILE_TYPE ;
LC$Msg VARCHAR2(2000) ;
BEGIN
-- get the BLOB column --
BEGIN
EXECUTE IMMEDIATE PC$SQL_Order INTO src_lob ;
EXCEPTION
WHEN NO_DATA_FOUND THEN
LC$Msg := 'Write_Binary_File(): NO_DATA_FOUND' ;
IF PB$Raise 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( PC$Directory, PC$File_Name, 'W', 32764 ) ;
-- write the file --
LOOP
-- read the chunks --
Dbms_Lob.READ (src_lob, amt, pos, buffer);
-- write the chunks --
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);
WHEN OTHERS THEN
LC$Msg := 'Write_Binary_File() Error : ' || TO_CHAR( SQLCODE ) || ' while managing file ('
|| PC$Directory || ') ' || PC$File_Name ;
IF PB$Raise THEN
RAISE_APPLICATION_ERROR( -20100, LC$Msg ) ;
END IF ;
Dbms_Output.Put_Line(LC$Msg);
END Write_Binary_file;
But this code seems not working. The problem is it always creates a file with a bit bigger size than initial one. So jpg copy will be never be opened with any viewer.
Can anybody explain this issue and give any workaround?
ThanksYou need a code block like this:
DECLARE
l_file UTL_FILE.FILE_TYPE;
l_buffer RAW (32767);
l_amount BINARY_INTEGER := 32767;
l_pos INTEGER := 1;
l_blob BLOB;
l_blob_len INTEGER;
BEGIN
-- Open the destination file. Note the third parameter "wb"
l_file := UTL_FILE.FOPEN ('TEST_DIR', 'extract3.jpg', 'wb');
-- Get LOB locator
FOR rec IN (
SELECT blob_col l_blob
FROM test_my_blob
--AND ROWNUM =1
LOOP
l_blob_len := DBMS_LOB.getlength (rec.l_blob);
-- Read chunks of the BLOB and write them to the file
-- until complete.
WHILE l_pos < l_blob_len
LOOP
DBMS_LOB.READ (rec.l_blob, l_amount, l_pos, l_buffer);
UTL_FILE.put_raw (l_file, l_buffer, FALSE);
l_pos := l_pos + l_amount;
END LOOP;
commit;
END LOOP;
-- Close the file.
UTL_FILE.FCLOSE (l_file);
EXCEPTION
WHEN OTHERS
THEN
-- Close the file if something goes wrong.
IF UTL_FILE.IS_OPEN (l_file)
THEN
UTL_FILE.FCLOSE (l_file);
END IF;
RAISE;
END; -
Need to compare values in two columns of one table against values in two columns in another table
Hi, as the title reads, I'm looking for an approach that will allow me to compare values in two columns of one table against values in two columns in another table.
Say, for instance, here are my tables:
Table1:
Server,Login
ABCDEF,JOHN
ABCDEF,JANE
FEDCBA,SEAN
FEDCBA,SHAWN
Table2:
Server,Login
ABCDEF,JOHN
ABCDEF,JANE
FEDCBA,SHAWN
In comparing the two tables, I'd like my query to report the rows in table1 NOT found in table2. In this case, it'll be the 3rd row of table one:
Server,Login
FEDCBA,SEAN
Thanks.create table Table1([Server] varchar(50), Login varchar(50))
Insert into Table1 values ('ABCDEF','JOHN'),('ABCDEF','JANE'),('FEDCBA','SEAN'),('FEDCBA','SHAWN')
create table Table2([Server] varchar(50), Login varchar(50))
Insert into Table2 values ('ABCDEF','JOHN'),('ABCDEF','JANE'), ('FEDCBA','SHAWN')
select [Server] ,Login from Table1
Except
select [Server] ,Login from Table2
select [Server] ,Login from Table1 t1
where not exists(Select 1 from Table2 where t1.[Server] = t1.[Server] AND Login=t1.Login)
drop table Table1,Table2 -
How to get BW-BPS variable value into Visual Basic?
Hello,
Scenario:
Time characteristic 0FISCYEAR has a variable ZVFYEAR. In layout this time characteristic is defined as DATA COLUMN. When user changes VFYEAR variables value i want to get the value of variable into Visual Basic and to format header for table in the layout.
How to get BW-BPS variable value into Visual Basic?
Could you help me?
Thanks in advance.
Best Regards,
Arunas StonysHi,
If i understand your requirments correctly ,you need to read the value of the Variable and Put it on the layout. Here is how i would solve this,
Read the value of the variable using an ABAP program.The logic for this would be to read the variable value and post it on the layout on a cell.You can do this by calling the ABAP program on opening the layout.this can be done using LB_EXIT_FM T-code. Now using the SAP delivered SAPAfterDataPut macro, read the cell in which you have placed the variable values and assign it to the necessary values you want to on the layout.All this will be done before the layout opens.
Hope this helps.
regards
Sai Vishnubhatla -
How to fulfill the virtual characteristic value into report
Hi Experts,
I am working on one reporting requirement that needs to add reference date (virtual characteristic) field to report.
I have added reference date field to query and able to display the field in report.But I am not able to display reference date field runtime data in to report output.
Could someone please help me on this how to display this virtual characteristic values into report.where the runtime variable values are stored.How to fill the data etc.
Thanks in advance.
Best Regards,
Hari.
Edited by: k hari on Jan 29, 2008 6:22 AM
Edited by: k hari on Jan 29, 2008 6:24 AMYou can achieve this using Customer Exit or BADI. Check the folllowing link.
http://help.sap.com/saphelp_nw70/helpdata/en/ac/ef1f43daac9a448f0150a02e3a7aba/content.htm
If you are using BADI
You can create Virtual CHAR in BADI using transaction SE19
In this transaction you can create a new or display the existing BADI.
There you can see two tabs
The Attribute Tab we need to give the name of the Multiprovider on which the query with the virtual char is getting executed.
The Inerface Tab has three following sections. Need to write the ABAP code for all the three.
Define : Defind all the characteristics and virtual char that will be used for populating virtual char
Initialize : Initialize them
Compute : Here you will have to write the logic for populating the virtual char.
Once the logic is written then you can use this char in your query .
Hope this helps. -
How to copy one request to another request
Hi all,
How to copy one request to another new request?
I have a released workbench request in which it has around 1200 Objects (including data elements, domains, programs and many more), now i need to copy all these objects into a new request.
I can do this by SE03 (Include Objects in a Transport Request ) transaction, but it is a lengthy process.
Is there any way to copy directly in one go.
Plz help...
Regards,
Satish Reddy D.Hi,
The thing is like this....
i have a released request in which we have more than 1200 objects, in that i dont need 10 objects.
so when i create it as copy of transport request, i just deleted those 10 objects and saved.
Now, if i transport the new request how many objects will go? 1200 or 1190?
in the new request i am getting the old request under Comment: Object List Included.
is it necessary to transport the old request?
i need to transport only 1190 objects.
Regards,
Satish Reddy.
Edited by: Sathish Reddy on Jan 28, 2010 2:18 PM -
How Can I Set a Javascript Value into an Attribute of BSP PAGE
Hi
Can anyone tell me.
How Can I Set a Javascript Value into an Attribute of BSP PAGEHi Mithlesh,
javascript runs on client side and you cannot assign the value to a Page attribute directly.
As a workaround,you can use an Inputfield,hidden if required,and set the value using javascript.Then the form will have to be submit to be able to read the value in onInputProcessing and then can be assigned to any variable.
In Layout
<head>
<script language="javascript">
function pass()
txt1 = document.getElementById("ip_mrf");
txt.value = "hello" ;
</script>
</head>
<htmlb:inputField id="ip_mrf"
value="<%=mrf_number%>"
visible="FALSE"/>
in onInputProcessing
cha1 = request->get_form_field( 'ip_mrf' ).
where cha1 is the page attribute
hope this helps,
Regards,
Siddhartha
Message was edited by: Siddhartha Jain -
How can I reference the last value in a column?
How can I reference the last value in a column? For example, today I want the value of A1 to appear in another cell. Tomorrow, I will add a row and want to reference A2, next day A3, and so forth.
Now I got it:
=OFFSET(A1,COUNT(A)-1,0) -
How can i get this variable value into second page IN BSP
Hi friends
I have variable wk_matnr value 'ABC' in first page of BSP.
How can i get this variable value into second page.
MoosaHi,
you can define variable (page attribiue) on the second page with the same name. You can realise the Navigation with Button ther started onInputProcesing routine. In onInputProcesing you have to call navigation->set_parameter with attribut name as parameter and then starting the navigation. If you have checked the auto property on the variable on second page and varable have same name, the value of variable should be transported.
[See this tutorial|http://help.sap.com/saphelp_erp2005/helpdata/DE/1a/c5133a62983c0ae10000000a114084/frameset.htm]
Best regards
Bogdan -
How can we include the property value into the News RSS?
We have defined object property u201CDepartmentu201D that is used in News XML creating form. How can we include the property value into the News RSS (set value of the particular RSS XML tag)?
We have solved the issue with NWDS
-
To display comma separted value into multiple column
Hi,
I want to display value into multiple column like below
data is like this
col1
res_menaHome:MenaHome
res_menaHomeEmp:MenaHome Employee
res_MDSpecialSer:MD Special Services
res_Smart:Smart
now i want to display like
col1 col2
res_menaHome MenaHome
res_menaHomeEmp MenaHome Employee
res_MDSpecialSer MD Special Services
res_Smart Smart
Thanks in advance.You mean like this?
with q as (select 'res_menaHome:MenaHome' myString from dual)
select substr(myString, 1, instr(myString, ':') - 1) col1,
substr(myString, instr(myString, ':') + 1) col2
from q
COL1,COL2
res_menaHome,MenaHome -
State machine custom task workflow how to pass one task field value to the next task field
i am using ItemMetadata.xml to pass value from list to custom task first value its passing the but second value is showing as null
plus how to pass one custom task value to the next custom task
i.e one supervisor approver comments submitted field i want to see on department manager approval custom task which is the next approver from supervisor
ows_firstfield=""
ows_SecondField=""
the above ows fields are from list
in this i am unable to retrive the second value in the task form this is my first query?
second query is that how can we pass one task field value to next approver task field value?
any idea
MCTS,ITILWhat type of workflow is this? IS this Visual Studio or SharePOint designer or third party (K2, Nintex, etc...)? YOu should be able to get ahold of the task that was edited via the correlation token, and then grab any value you want from that
task (wether it be a custom field or a standard worfklow task field).
It would help to know what you are using to build the workflow.
Thanks! -
How to copy one month to several months in journal
Hi all
how to copy one month to across months using single selection. right now i can do month over by month in journal.
any thoughts and suggestions will be highly appreciated
thanks
RamanaHi,
The easiest approach to this can be the use of script logic.
Maybe you are looking for
-
Problem with custom control and focus
I've a problem with the focus in a custom control that contains a TextField and some custom nodes. If i create a form with some of these custom controls i'm not able to navigate through these fields by using the TAB key. I've implemented a KeyEvent l
-
Cost center and Pernrs Associated with it
How to Identify the no of pernrs associated to Cost center ? can any body tell me the Transaction that tells this?
-
Setting default printing presets for all users, esp. guest user
i want to set black/white, two sided printing as the default for all users (9 macs, 30 users on each). i set up and save this preset as admin, and copy the files com.apple.print.custompresets.plist com.apple.print.custompresets.forprinter.nameofprint
-
Using Dual Display. Turn Off MBP Display?
I have no interest in using Clamshell Mode. Is there a way to disable the MBP display while connected to a second monitor with lid open?
-
My new laptop does not have an ieee 1394 input. Can I capture HD video with USB3.0 or HDMI?