Extracting data from Z-table from SAP R/3 to BW
Hi all
I want to extract data from a Z-table from SAP R/3 system to Bw system. Currently I am on BW 3.5. Since it is a Z table I dont have a standard extractor for it & I dont knw how to create it. Can anyone provide me with the step-by-step documentation of how to extract data from a non standard SAP table????
Hi
You need to create Generic Datasource on the Z-Table you want to get data from
Go to RSO2 transaction to create generic datasource .
You need to give technical name of datasource under datasource type you want and click on create. Then you can give descrption and Application component under which u want see the datasource,
enter the z table name under view/ table and save.
here you can click on check boxes to make fields hidden or selection fields.
Regards
Ravi
Edited by: Ravi Naalla on Aug 25, 2009 8:24 AM
Similar Messages
-
How to insert data into a table from an xml document
using the XmlSql Utility, how do I insert data into a table from an xml document, using the sqlplus prompt.
if i use the xmlgen.insertXML(....)
requires a CLOB file, which i dont have, only the xml doc.
Cant i insert directly from the doc to the table?
the xmlgen examples I have seen first convert a table to a CLOB xmlString and then insert it into another table.
Isnt there any other way?Your question is little perplexing.
If you're using XML SQL Utility from
the commandline, just use putXML.
java OracleXML putXML
null -
How to move the data of a table from sqlplus to XML file
Hi,
Could you pls guide me how to move the data of a table from sqlplus to XML file.
i want to do it from sqlplus rather than toad.pls help
ThanksOh..I'm in 9i.
Try this out..and let me know.
DECLARE
CTX DBMS_XMLGEN.CTXHANDLE ;
XML CLOB ;
F UTL_FILE.FILE_TYPE;
XMLC VARCHAR2(32767);
BEGIN
CTX := DBMS_XMLGEN.NEWCONTEXT('SELECT * FROM department1 ') ;
XML := DBMS_XMLGEN.GETXML(CTX) ;
XMLC:=TO_CHAR(XML);
SHOW_ENVELOPE(XMLC);
F := UTL_FILE.FOPEN('ATTACH_FILES','DEPT.XML', 'W');
UTL_FILE.PUT_LINE(F,XML);
UTL_FILE.FCLOSE(F);
END ;
Good luck!!!
Bhagat
null -
How do I run a database procedure that inserts data into a table from withi
How do I run a database procedure that inserts data into a table from within a Crystal report?
I'm using CR 2008 with an Oracle 10i database containing a number of database tables, procedures and packages that provide the data for the reports I'm developing for my department. However, I'd like to know when a particular report is run and by whom. To do this I have created a database table called Report_Log and an associated procedure called prc_Insert_Entry that inserts a new line in the table each time it's called. The procedure has 2 imput parameters (Report_Name & Username), the report name is just text and I'd like the username to be the account name of the person logged onto the PC. How can I call this procedure from within a report when it's run and provide it with the 2 parameters? I know the procedure works, I just can't figure out how to call it from with a report.
I'd be grateful for any help.
ColinHi Colin,
Just so I'm clear about what you want:
You have a Stored procedure in your report. When the report runs, you want that same procedure to write to a table called Report_Log.
If this is what you want the simple answer is cannot be done. Crystal's fundamental prupose is to read only, not write. That being said, there are ways around this.
One way is to have a trigger in your database that updates the Report_Log table when the Stored Procedure is executed. This would be the most efficient.
The other way would be to have an application run the report and manage the entry.
Good luck,
Brian -
Insert data into fact table from source database tables
here i try to insert data into fact table from source database tables here is the query
ALTER procedure [dbo].[facttable]
as
insert into [pp dw].dbo.Dimfact(Prod_ID,Production_ID,Material_ID,Equip_ID,WC_ID,Recipe_ID,Quantity,costprice)
select Products.[Product ID],[Production ID],Materials.[Material ID],[Equipment ID],[Work Centre ID],[Recipy ID],Quantity,[cost price]
from
[PRODUCTION PLANNING 2].dbo.[Products],
[PRODUCTION PLANNING 2].dbo.[Production Detail],
[PRODUCTION PLANNING 2].dbo.[Material category],
[PRODUCTION PLANNING 2].dbo.[Materials],
[PRODUCTION PLANNING 2].dbo.[Equipment],
[PRODUCTION PLANNING 2].dbo.[Working Centre] ,
[PRODUCTION PLANNING 2].dbo.[Recipies]
where
Products.[Product ID] in (13, 14, 15, 16, 17) and
[Production Detail].[Production ID] in (1, 2, 3) and
[Materials].[Material ID] in (1, 2, 3, 4, 5) and
[Equipment].[Equipment ID] in (1, 2, 3, 4) and
[Working Centre].[Work Centre ID] in (1, 2, 3) and
[Recipies].[Recipy ID] in (1, 2, 3) and
[Material category].[Category ID] in (8, 9, 10, 11, 12, 13)
and when i execute query it shows me error
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Dimfact_Dimproduct". The conflict occurred in database "pp dw", table "dbo.Dimproduct", column 'Prod_ID'.
ERD IS
HOW TO SOLVE THIS PROBLEM?I cant see any join conditions in your query posted. Whats the purpose of the query above. It will just bring you a cartesian product (cross join) of tables involved subjected to filters. Are you sure this is the correct query?
The error you're getting may be because you've not yet populated DimProduct or may be because of logic you used in popultaing DimProduct causing it to miss some records which is what query is referring to in above case.
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Insert data into oracle table from XML file
I need to insert data into oracle table from XML file
If anybody handled this type of scenario, Please let me know how to insert data into oracle table from XML file
Thanks in advanceThe XML DB forum provides the best support for XML topics related to Oracle.
Here's the FAQ on that forum:
XML DB FAQ
where there are plenty of examples of shredding XML into Oracle tables and such like. ;) -
Extract Data in Power Pivot from MDX with diffrentnt different Level of Hierarchy in MDX
Hi All,
My requirement is to extract the data form tabular model and put in power pivot,as all the measures calculation is present in model just extracting the aggregated data.
Issue is appearing on Rolling up the data, so is there any way to extract the data so that it will display the right data on different level. As per the below example on level 2 data is getting summed up which is not correct.
Ex:-
Level1
A
10%
B
20%
Level2
30%
Thanks ChandanHi Chandan,
According to your description, you create a SQL Server Analysis Services Tabular model and extract Data in Power Pivot from MDX, the problem is that the hierarchy data rolling up base on the hierarchy level, right?
I have tested it on my local environment, we cannot reproduce this issue. So as per my understanding, the issue can be cause by the hierarchy setting in your tabular model. Here are some links about how to create and manage hierarchies in a tabular model,
please refer to the links and check if the settings are correct.
http://msdn.microsoft.com/en-in/library/hh213003.aspx
http://www.youtube.com/watch?v=qKKNY1Vj_2c
If the issue persists, please provide us more information about you hierarchy creation steps, so that we can make further analysis.
Regards,
Charlie Liao
TechNet Community Support -
Export data for the table of SAP using the JCO
Good Morning,
Sorry error of the agreement, and that I am using a translator.
I am needing of help, to solve a problem that I have to integrate the system in Java using the SAP JCO.
Well I need send (Export_Parameter) data into a table in SAP,but I do not know this process.
If someone went through that and can help, thank you in advance
Obs : Not found documents that help me
Att
Elton C.This is a forum for problems with the Java language and the default libraries that come with it. We can't help you with any third-party applications/libraries such as SAP and JCO.
Sorry. -
How to copy the Data From Oracle Table To SAP Table
Hi Friends,
We need to copy the data from Oracle Database Table to SAP Table. The data should be updated simultaneously in both tables . Should I write a program that contains the native sql statement like EXEC SQL PERFORMING WRITE,....
I appreciate any suggestions regarding this.
Regards
CSM ReddyHi,
since you posted this question in the DB2 forum I assume that you are using a DB2 database for your SAP system.
To access a table from a legacy ORACLE database you may use the DBSL multiconnect feature. I.e. you open a secondary connecction in the SAP system to your ORALE database. You can then ready the data from the ORACLE database into an ABAP internal table and insert it afterwards into the DB2 table on the main connection.
Another way to access an ORACLE table from a DB2 database is to use the DB2 federated database feature. This requires a little bit more DB2 skill. With this feature you can make the ORACLE table visible within the DB2 database. To copy data you can then simply use a "INSERT ... SELECT" statement.
Regards
Frank -
Regarding fetching data into internal table from D.B Tables, D.B View
Hi All,
I Have following 5 tables in my Database.
LTAP
TABNAME
FIELDNAME
KEYFLAG
LTAP
MANDT
X
LTAP
LGNUM
X
LTAP
TANUM
X
LTAP
TAPOS
X
LTAP
VLPLA
Z0MNH
TABNAME
FIELDNAME
KEYFLAG
Z0MNH
MANDT
X
Z0MNH
WERKS
X
Z0MNH
ZMANNO
X
Z0MNH
LGNUM
X
Z0MNH
AENAM
Z0MNH
BUDAT
Z0MNH
CPUTM
Z0MNH
LAEDA
Z0MNH
STATUS
Z0MNH
USNAM
Z0MNH
ZARDAT
Z0MNH
ZARTIM
Z0MNH
ZCLDAT
Z0MNH
ZCLTIM
Z0MNH
ZDPDAT
Z0MNH
ZDPTIM
Z0MNH
ZDRIVR
Z0MNH
ZINDAT
Z0MNH
ZINTIM
Z0MNH
ZLOAD
Z0MNH
ZNOTES
Z0MNH
ZPRDAT
Z0MNH
ZPRTIM
Z0MNH
ZSUPR
Z0MNH
ZTRAILR
Z3MANBOXIDHDR
TABNAME
FIELDNAME
KEYFLAG
Z3MANBOXIDHDR
MANDT
X
Z3MANBOXIDHDR
WERKS
X
Z3MANBOXIDHDR
ZMANNO
X
Z3MANBOXIDHDR
EXIDV
X
Z3MANBOXIDHDR
NLPLA
Z3MANBOXIDHDR
NLTYP
Z3MANBOXIDHDR
VLTYP
Z3MANBOXIDHDR
Z0PAL
Z3MANBOXIDHDR
Z3COMENT
Z3MANBOXIDHDR
Z3RECPT_FLAG
Z3MANBOXIDITM
TABNAME
FIELDNAME
KEYFLAG
Z3MANBOXIDITM
MANDT
X
Z3MANBOXIDITM
WERKS
X
Z3MANBOXIDITM
ZMANNO
X
Z3MANBOXIDITM
EXIDV
X
Z3MANBOXIDITM
ITEM_NO
Z3MANBOXIDITM
MATNR
Z3MANBOXIDITM
VEMEH
Z3MANBOXIDITM
VEMNG
Z3MANBOXIDITM
Z_CARTON
Z3MANBOXIDSERIAL
TABNAME
FIELDNAME
KEYFLAG
Z3MANBOXIDSERIAL
MANDT
X
Z3MANBOXIDSERIAL
WERKS
X
Z3MANBOXIDSERIAL
EXIDV
X
Z3MANBOXIDSERIAL
ZMANNO
X
Z3MANBOXIDSERIAL
ITEM_NO
Z3MANBOXIDSERIAL
SERNR
Based on all the above tables i need to fill in below internal table field as given below:
<b>Internal Table I_TAB
ZMANNO
LGNUM
WERKS
EXIDV
ITEM_NO
MATNR
SERNR
VEMNG
VEMEH
VLTYP
NLTYP
VLPLA
NLPLA
ZLOAD
USNAM
STATUS
BUDAT
CPUTM
ZINDAT
ZINTIM
ZARDAT
ZARTIM
ZCLDAT
ZCLTIM</b>
Extract data from Manifest header <b>Z0MNH, Z3MANBOXIDHDR,
Z3MANBOXIDITM, Z3MANBOXIDSER and LTAP</b> tables based on selection parameter.
Selection Screen will have folowing Select-option fields-
<b>LGNUM
WERKS
ZMANNO
USNAM
ZLOAD
EXIDV
MATNR
SERNR
VLTYP
NLTYP
VLPLA
NLPLA
BUDAT
ZINDAT
ZARDAT
ZCLDAT</b>
Based on above selection criteria i need to fetch above internal table fields data.
Then need to Move corresponding header and item data in ITAB_RESULT internal table.
I need to fetch above fields based on above 5 tables and put in final Internal Table.
Can anybody tell me the logic how can i write the same.
Also can anybody tell me i am trying to create a DataBaseView for
Z0MNH, Z3MANBOXIDHDR, Z3MANBOXIDITM, Z3MANBOXIDSERIAL and LTAP tables.
<b>Note:
1. Z3MANBOXIDITM table may contain multiple material[MATNR] for same box-id[EXIDV] (with another line item).
2. Z3MANBOXIDSERIAL table may contain multiple record for one box id[EXIDV]+item_no[ITEM_NO].</b>
But what are the <b>TABLE/JOIN Conditions</b> i need to write while creating <b>DB View</b> for above <b>5</b> tables.
Can anybody solve above 2 issues!
Thanks in advance.
Thanks,
Deep.Hi Deep,
While creation of DB view just make sure abt the key relation between the tables. Based on that u can join the tables...First fetch the data from header table then by using for all entries u can fetch the line items data.
Hope this helps you. Reply for queries, shall post the updates.
Regards.
Kumar. -
Error while selecting data for mara table from KOTG516 table
Hello all,
I am trying to select the data from mara table with respect to KOTG516 table . but i am not getting the value into t_mara table as t_kotg516-matnr is empty . but the t_kotg516 conatins the matnr value . here is the code . i am not getting where i went wrong . please help .
TYPES: BEGIN OF Y_KOTG516,
KAPPL TYPE KAPPL,
KSCHL TYPE KSCHG,
VKORG TYPE VKORG,
VTWEG TYPE VTWEG,
KUNAG TYPE KUNAG,
MATNR TYPE MATNR,
DATBI TYPE KODATBI,
END OF Y_KOTG516.
DATA: T_KOTG516 TYPE STANDARD TABLE OF Y_KOTG516,
E_KOTG516 TYPE Y_KOTG516.
TYPES: BEGIN OF Y_MARA,
MATNR TYPE MATNR,
MEINS TYPE MEINS,
END OF Y_MARA.
DATA: T_MARA TYPE STANDARD TABLE OF Y_MARA,
E_MARA TYPE Y_MARA.
SELECT KAPPL
KSCHL
VKORG
VTWEG
KUNAG
MATNR
DATBI
FROM KOTG516
INTO TABLE T_KOTG516
WHERE VKORG IN S_VKOR
AND VTWEG IN S_VTWE
AND KUNAG IN S_KUNAG.
IF NOT T_KOTG516[] IS NOT INITIAL
and SY-SUBRC EQ 0.
SELECT MATNR
MEINS
FROM MARA
INTO TABLE T_MARA
FOR ALL ENTRIES IN T_KOTG516
WHERE MATNR EQ T_KOTG516-MATNR
AND MEINS EQ 'CS'
OR MEINS EQ 'IT'.
ENDIF.
FOR T_KOTG516 I HAVE VALUE but matnr is not getting selected from mara table as i cheked t_kotg516-mara is empty . i cant use with header line . please advise .
Regardshi,
SELECT KAPPL
KSCHL
VKORG
VTWEG
KUNAG
MATNR
DATBI
FROM KOTG516
INTO TABLE T_KOTG516
WHERE VKORG IN S_VKOR
AND VTWEG IN S_VTWE
AND KUNAG IN S_KUNAG.
if sy-subrc = 0 .
SELECT MATNR
MEINS
FROM MARA
INTO TABLE T_MARA
FOR ALL ENTRIES IN T_KOTG516
WHERE MATNR EQ T_KOTG516-MATNR
AND MEINS EQ 'CS'
OR MEINS EQ 'IT'.
ENDIF.
regards
deepak . -
Help needed in Loading excel data to staging table from OAF Page
Hi All,
We have a requirement from the client on loading of a excel sheet data into staging table using OAF page.
We were able to load a CSV file into staging table via OAF. The approach we used is we created a item of style 'messageFileUpload', which would pick the CSV file from desktop and we wrote the logic on the controller to place the file into server and then sumit a concurrent program to load the data into the staging table.
But client wants data from the excel file to be loaded into staging table. Is there any way(approach) by which we can convert the excel file data into .CSV file using OAF?
Any help or pointers on this will be highly apperciated.
Thanks,
ChethanaHi,
Read through this :
Need to upload a CSV/Excel to a table in OAF page
Thanks,
Gaurav -
Urgent - Append data to internal table from Application server
Hi All,
I encountered the problem while read the input file from Application server...then append it to internal table. I manage to read the input file from presentation and append the data to internal table.
Below are my coding which cause me not able the append data from Application server. Please kindly help me to solving/correct my coding. Thanks in advance .
PARAMETERS : p_inpfl LIKE rlgrap-filename. "Material Input File
SELECTION-SCREEN BEGIN OF LINE.
Application Server
SELECTION-SCREEN COMMENT 1(19) text-002 FOR FIELD rb_ux.
SELECTION-SCREEN POSITION 33.
PARAMETERS: rb_ux RADIOBUTTON GROUP g1.
Presentation Server
SELECTION-SCREEN COMMENT 40(21) text-003 FOR FIELD rb_pc.
SELECTION-SCREEN POSITION 65.
PARAMETERS: rb_pc RADIOBUTTON GROUP g1 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK b01.
FORM f_Input_file.
CLEAR: v_f_exists.
CHECK NOT p_inpfl IS INITIAL. "input file exist
IF NOT rb_pc IS INITIAL. " Pc check
PERFORM f_read_tab_delimited_file TABLES i_input
USING c_09
p_inpfl
rb_ux
CHANGING v_ifile_str_with_tab
v_f_exists
v_ifile_record_count
v_message.
IF v_f_exists EQ '1' .
UPLOAD FILE could not be read
MESSAGE e546 .
ENDIF .
IF v_ifile_record_count EQ 0 .
Zero records in upload file
MESSAGE e547 .
ENDIF.
ELSE.
OPEN DATASET p_inpfl FOR INPUT IN TEXT MODE.
DO.
READ DATASET p_inpfl INTO i_input.
IF sy-subrc EQ 0.
APPEND i_input.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET p_inpfl.
ENDIF.Hi,
Refere the following code for the poulating internal from the application server.
PARAMETERS : pr_sfile TYPE filename-fileintern,
Here give the logical file name from the application serevr.
data : w_param_1 LIKE filename-fileintern,
x_file(500),
w_move_file LIKE epsf-epsfilnam,
w_from_dir LIKE epsf-epsdirnam,
w_path LIKE rlgrap-filename,
input_line(1000),
w_path LIKE rlgrap-filename,
w_file LIKE rlgrap-filename,
w_dir LIKE rlgrap-filename,
w_dir1 LIKE epsf-epsdirnam,
w_file1 LIKE epsf-epsfilnam,
**************Start of the code***************
MOVE '*' TO w_param_1.
PERFORM get_file_name USING pr_sfile w_param_1.
LOOP AT it_file WHERE name CP w_file1.
CLEAR : x_file, w_path,
w_move_file, w_from_dir.
REFRESH : it_input,
it_input_err.
IF w_flag IS INITIAL.
CONCATENATE w_dir it_file-name INTO x_file.
CONDENSE x_file.
TO Move file from sever for backup storing the file name and path
w_path = x_file.
CALL FUNCTION 'TRINT_SPLIT_FILE_AND_PATH'
EXPORTING
full_name = x_file
IMPORTING
stripped_name = w_move_file
file_path = w_from_dir
EXCEPTIONS
x_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
********here it_input will be the structure of the file present on the application server
PERFORM read_file TABLES it_input
USING x_file.
CLEAR it_input_err.
REFRESH it_input.
ENDLOOP.
*******************end of the code****************
*& Form read_file
text
-->P_X_FILE text
FORM read_file TABLES it_tab
USING x_file.
OPEN DATASET x_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
WRITE : / text-006.
ELSE.
DO.
READ DATASET x_file INTO input_line.
IF sy-subrc = 0.
CLEAR: it_input, count.
DO.
ADD 1 TO count.
ASSIGN COMPONENT count OF STRUCTURE it_tab TO <fs>.
IF sy-subrc = 0.
SPLIT input_line AT separator INTO <fs> input_line.
ELSE.
EXIT.
ENDIF.
ENDDO.
APPEND it_tab.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
CLOSE DATASET x_file.
*& Form get_file_name
text
-->P_P_SFILE text
-->P_W_PARAM_1 text
FORM get_file_name USING p_sfile
w_param_1.
CHANGING x_file.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
client = sy-mandt
logical_filename = p_sfile
parameter_1 = w_param_1
IMPORTING
file_name = x_file
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
w_path = x_file.
CALL FUNCTION 'TRINT_SPLIT_FILE_AND_PATH'
EXPORTING
full_name = w_path
IMPORTING
stripped_name = w_file
file_path = w_dir
EXCEPTIONS
x_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
w_dir1 = w_dir.
w_file1 = w_file.
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
dir_name = w_dir1
file_mask = w_file1
TABLES
dir_list = it_file
EXCEPTIONS
invalid_eps_subdir = 1
sapgparam_failed = 2
build_directory_failed = 3
no_authorization = 4
read_directory_failed = 5
too_many_read_errors = 6
empty_directory_list = 7
OTHERS = 8.
IF sy-subrc <> 0.
WRITE : / text-006.
ENDIF.
Hope this will help you. -
How to return course data from different tables from a procedure
I have a procedure which must return information from two tables:
The sturcture of tables is as below:
Table 1:
id,
name,
property,
type
Table 2:
id1
id2 ,
property.
id1 of table2 refers to id attribute of table1. ie id is the foreign key for table2.
the tables are defined such that for corresponding to each id in table1 there would
be two or more rows in table2.
Now in the procedure given the id, i need to retrieve information from table1 and also all the rows in table2 which refers to id2.I want to return a cursor.How can i do this.
eg:
if table 1 has an entry with id 2
and table 2 has three entries with id1 referring to id(i.e id1=2)..I need to return the table1 entry with id=2 and three entires from table2 with id1=2.
If cursors are not appropriate, what other alternative methods can be used.
Any suggestions would be of great help.thanks for the reply,
The result set would be returned to the client .....which would do further processing.The client does not even know that the data is organized in two tables..Therefore given an id, client would expect to have all the information...i.e the info from table 1 and info from table 2 where the relation ship between id and other ids are stored.
i.e say client has id=6.This id has property,name,etc stored in table1.
This id can further be related to any number other of ids.It can be related 2,5,100,or may be even 10000s of other ids.This mapping between the original id and other ids..are stored in table2.
So given the id by the client , i would want to return property of the ids itself along with all the ids that it is related to .
I want to achieve this..... -
Replace the data in the table from other table
Iam creating a backup of table Order by this query:
create table orderbckup as select * from order; - this works
For the first time i have to create a orderbckup table but every month i have to replace the data in orderbckup from order table. Is there any way where i can copy the data from order and repalce the data in orderbckp - I cannot use insert as it adds the rows. Or do i need to delete the old table and create it again or can i use update. If so can anyone plz let me know882431 wrote:
Iam creating a backup of table Order by this query:
create table orderbckup as select * from order; - this works
For the first time i have to create a orderbckup table but every month i have to replace the data in orderbckup from order table. Is there any way where i can copy the data from order and repalce the data in orderbckp - I cannot use insert as it adds the rows. Isn't that exactly what you want to do - add rows?
If I understand you, the problem isn't with adding new rows; the problem is how to remove the old rows.
Or do i need to delete the old table and create it again or can i use update. If so can anyone plz let me knowInstead of dropping the table and re-creating it, you can TRUNCATE the table and then use INSERT:
TRUNCATE TABLE orderbackup;
-- At this point, orderbackup has 0 rows
INSERT INTO orderbackup
SELECT *
FROM orders -- ORDER is a reserved word in Oracle, so it's not a good table name
;TRUNCATE TABLE is faster than DELETing all the rows, because it doesn't save redo information. (That means you can't ROLLBACK a TRUNCATE statement, but you can rollback a DROP TABLE statement, either.)
Maybe you are looking for
-
Previously blocked client computers - now cannot install SCCM 2012 R2 client
Hello, I have a Primary Site on SCCM 2012 R2. New installation of 2012 R2, not upgrade from SCCM 2007. My environment is pretty small for now, having added just few dept computers in the company. We are using SCCM for Endpoint Security antivirus depl
-
Character value can display automatically
Dear Experts, i have a question for character value. In BW, we have master data for PH1-PH6. And if you know the PH6, there is unique value for PH1-PH5. For example, if PH6 = 111111, PH1 = 1, PH2 = 11, PH3 = 111,etc. This value is unique. Now we have
-
Hi All, I want to have multiple send mail steps (around 100) in my Workflow. But whenever create a step it creates a new Standard task. I do not want to create so many of them. Is there any way I can minimise that ? Consider that each send mail steps
-
Importing profile from another copy of firefox
I have been working with your files regarding moving Firefox profiles between computers. The instructions listed leave a lot to be desired. I want to move a profile from Firefox on a PC to Firefox on MacOS (SnowLeopard). At this point, when I open Tr
-
Printer Selection using the PLD
My current customer is automatically printing a Sales Order to the user's default printer when the Add button is pressed in Sales Order Entry. This works well, but my latest challenge is depending upon the time of day ( that is, morning vs afternoon