SQL procedure to copy the data
Hello
I'm looking for an example of a stored procedure that captures data on the dblink and fill a local table, the update ONLY when a State has changed in the GENERAL_STATE column.
Example of data of the remote server in the examples with explanation of the syntax will be really useful as I'm new to PL:
ID | ATN_ID | ID_EXT | NAME | S-TYPE | MANDATE | GENERAL_STATE | JOB_CLASS | IND_JOB_STOPPED |
10000 | 1 | 9971819911 | Initialization of the operational plan | JOB | MANDATORY_PRIMARY | HAS BEGUN | com.vanderlande.opm.bs.tasks.OperationalPlanInstantiationTask | 0 |
Do not reinvent the wheel. Use the MATERIALISEE VIEW? Read documentation http://docs.oracle.com/cd/B28359_01/server.111/b28326/repmview.htm
Tags: Database
Similar Questions
-
Use the stored procedure to create the data model for the bi publisher report
Hi all
Can we use stored procedure to create the data model for BI Publisher reports? I did find an example by using the stored procedure to complete the data model in the bi publisher report.
Thank you
ViratCheck out these links
BI publisher to use the stored procedure
Re: Stored procedures and dynamic columns
Re: Is it possible to use stored procedures in BI Publisher GUI?
Re: PL/SQL stored w / model XML?If brand pls help
-
PowerVault MD1000: Attached directly slow to copy the data from storage.
Hi all
I have a powervault MD1000 attached to a PE2900 using scsi. When I write for the PV everything is ok, but when I want to read it, for example copying the data from it, he grinds the server stops and usually falls!
can someone advice could be what the problem?
-
Not able to copy the data on USB in WIndows 7 even with administrative rights
I use Windows 7 64 bit and have administrator rights, I can copy data from USB but system is not allowing me to copy the data on USB. This has happened with me also, but since I change my laptop, this problem has been resolved.
It happened suddenly, earlier, I managed to copy the data to USB abd take backup of my system, but now it is not possible. Please notify.You may need to take possession of your records - see here:http://social.answers.Microsoft.com/forums/en-us/w7network/thread/24bdf172-2DBC-43b8-995d-a99b6a81413c/ -
Copy the data in the column of table 1->; table2
Hello I have a table like in this example:
Table1:
Notes ID 1 This is a short string 2 It is a text. 3 Test string Table2
ID cust_id comment 1 2 2 3 3 1 Now I want to copy the data from the 'notes' column in table2 in the "comment" column
table2 cust_id references ID in table1.
I have already tried:
Update table2
Set table2.comment = table1.notes
from table2
inner join table1 on
table2.cust_id = table1.ID;
But it does not work. I get an error.
What is the correct instruction for her?
Thanks for any advice.
UPDATE TABLE2
SET HOW = (SELECT NOTES FROM TABLE1
WHERE TABLE1.ID = TABLE2.ID)
WHERE EXISTS (SELECT 1 FROM TABLE1
WHERE TABLE1.ID = TABLE2.ID);
-
XTTS - problem by copying the data file in ASM
I test the migration of database from AIX to Linux using the cross-platform transportable tablespaces.
DB version: source: 10.2.0.4
Destination: 10.2.0.5
OS version: source: AIX6.1 - AIX - Based Systems (64-bit)
Destination: RedHat Linux - Linux x 86 64-bit
I have run the commands before copying the file data to destination below.
/DataImport is a shared file system mounted on Linux server and am able to see the file of data out there. But receive the error below to try to copy the data file on the linux server. Could someone let me know if I missed something / how to fix this error.EXECUTE DBMS_TTS.TRANSPORT_SET_CHECK('TBLSP1,TBLSP2', TRUE); SELECT * FROM TRANSPORT_SET_VIOLATIONS; no rows selected alter system archive log current; alter tablespace TBLSP1 read only; alter tablespace TBLSP2 read only; expdp DUMPFILE=xtts_exp.dmp DIRECTORY=DUMP_DIR logfile=xtts_exp.log TRANSPORT_TABLESPACES=TBLSP1,TBLSP2 CONVERT TABLESPACE TBLSP1,TBLSP2 TO PLATFORM 'Linux x86 64-bit' FORMAT '/dataimport/%U';
$rman target / RMAN> copy datafile '/dataimport/data_D-DBMGRT_I-3320277811_TS-TBLSP1_FNO-26_05m8miia' to '+DATA'; Starting backup at 05-APR-11 using channel ORA_DISK_1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of backup command at 04/05/2011 10:19:44 RMAN-20201: datafile not found in the recovery catalog RMAN-06010: error while looking up datafile: /dataimport/data_D-DBMGRT_I-3320277811_TS-TBLSP1_FNO-26_05m8miia
To be honest, I don't really see what you have done in the op, so I can't really comment on. I see you have an export of the TTS, but that's all.
If you have followed all the list I mentioned (you did write the TTS reading?), then you can try to save the file with RMAN, but I suspect that it does not work. Do you get the error even if you move the shared location (/ donneesimporter) to a local directory on the target area? Maybe he doesn't like the fact that it's a NFS mount (or whatever the proportion is).
Or maybe it's because you going to 10.2.0.4 10.2.0.5. I have always had the same group of patches and updated once I had plugged the tablespaces on the target database.
-
Copy the data from CollaborateSync to the other pc
Because Acrobat crashes sometimes, I would like to copy the data from CollaborateSync to a PC Backup. This means that I have shared a pdf with PC A one form I'd like to get answers on the PC B, too.
I tried to copy the Synchronizer-folder "documents and settings" - folder but I can't get answers.
What information should I copy can I geht PC B answers?
Klaus
Find the file "Workflows" in Acrobat under Documents and Settings folder. It is located inside the folder "Collab. If this file is missing, copy the folder "Synchronizer" will not do anything good.
In addition, copy "Forms" folder as well.
-
SQL Developer: How to copy the data with the output grid column headers?
Hello
I use the 2.1.1.64 Version.
I run a SQL query, down the results grid in the "Query result" window below. Say that I get 10 rows returned, with 5 columns.
I want to copy this whole grid, as well as the names/column headers to the Clipboard. If I can stick under the original query to document the results of this query.
I can't find any way to do this. I can copy/paste the results grid, but it does not copy the headers.
The only way I think to do is to go through many steps to export in a TXT file, then paste that. Unfortunately, that's a lot of steps wasted if I need to do it again and again, and more, the output is pasted in an ugly format with double quotes, etc..
It seems that the easiest feature is copy and paste the entire grid of the results, and of course, you could the headers. Why is it so difficult/impossible to do?
(I think that the toad has the same problem. DBArtisan lets you copy and paste the results together, as well as headers, however.)
Any help would be appreciated!
Thank you
JohnShift-Ctrl-C will copy the headers of columns as well as the selected data.
-
How to copy the data from Palm Desktop on a PC running Windows 8.1
If like me you still find the Palm Desktop data (addresses, calendar, notes, etc.) handy and use it long after throwing the combined capacity and 'sync', you can see this is useful. I bought a new PC running Windows 8.1 and had problems with data transfer due to a problem as I understand it, which does not exist in Windows XP, Vista or 7 versions. Here is a summary of a way to easily transfer data from these earlier versions if you have a USB flash drive (or Dropbox, Google Drive, whatever) very convenient:
(1) Download Palm Desktop 6.2 or 6.2.2 to your new PC. Give a user name exactly as it exists in the database from your old PC. This name will serve as Office Automation to create a folder name of six letters (an abbreviated version of your name) to hold the data that Palm Desktop will turn upward. Wait a few seconds for this to happen, and then close the application on your new desktop.
(2) in your old PC you want to transfer data from, find the folder named "Palm OS Desktop" which should exist in 'Documents' under path of folder and subfolders 'Users' as > your subfolder name > Documents in Windows 7 (can also be Vista) or may be under "Documents and Setting" folder in Windows XP.
(3) in this folder "Palm OS Desktop" search this subfolder of six letters of your name and select this whole subfolder and select 'Copy' or Ctrl-C
(4) locate the same name of subfolder in your new PC (which will have data zero), delete and then 'paste' the subfolder you "copied" in the exact same location. If you did it right, Viola! Your new desktop PC should display all the transferred data, once you open the application again.
Most of the same procedure works with PC Windows 8.1 (probably also Windows 8). What I found different is that the subfolder of data created under "Palm OS Desktop} had 7 instead of 6 characters with a"0"(zero), added as the last character. When finally, you copy and paste this subfolder in the new PC there so rename and add "0" for the Palm Desktop to locate these data.
I hope this helps.
Data in XP is located in C:\Program Files\Palm (or PalmOne) \ < your HotSync name truncated > \Backup.
HotSync for Win8 has been available for quite a while now! See the post at the beginning of this section called "64-bit Windows USB drivers for Palm Desktop" for instructions and driver downloads.
Palm Desktop 4.x and 6.2.2 use different database formats - 6.2.2 went to .mdb as an extension.
Best way to migrate data is to perform a HotSync on the new machine, or use the built-in in Palm Desktop Export/Import option. Export the addresses and calendar files, and then copy those of the new machine.
The import option to retrieve data.
WyreNut
-
Creating a PL/SQL procedure to run the following code but the landing upwards errors!
Hey all!
This is my first time with PL/SQL. I created the following procedure to load a major part of the update instructions at the same time to read the DB performance. I need to print a sysdate timestamp before and after the load so that I can know how long it takes for the DB update prescribed lines. I gave 100 lines initially and will keep changing. When I run this code, I came across some errors. Could you please help me with it.
CODE:
PROCEDURE FACT_UPDATE
IS
DECLARE
CNT NUMBER: = 0;UPD CURSOR is
SELECT
'UPDATE XXAFL_MON_FACTS_F SET TASK_WID =' | NVL (TO_CHAR (TASK_WID), 'NULL') |', EXECUTION_PLAN_WID =' | NVL (TO_CHAR (EXECUTION_PLAN_WID), 'NULL').
', DETAILS_WID =' | NVL (TO_CHAR (DETAILS_WID), 'NULL') |', SOURCE_WID =' | NVL (TO_CHAR (SOURCE_WID), 'NULL') |', TARGET_WID = ' | NVL (TO_CHAR (TARGET_WID), 'NULL').
', RUN_STATUS_WID =' | NVL (TO_CHAR (RUN_STATUS_WID), 'NULL') |', SEQ_NUM =' | NVL (TO_CHAR (SEQ_NUM), 'NULL') |', NAME = "' | NVL (TO_CHAR (NAME), 'NULL').
"', NO_POSITION =" ' | NVL (TO_CHAR (INSTANCE_NUM), e ') | " ', INSTANCE_NAME = "' | NVL (TO_CHAR (INSTANCE_NAME), 'NULL').
"', TYPE_CD =" ' | NVL (TO_CHAR (TYPE_CD), e ') | " ', STATUS_CD = "' | NVL (TO_CHAR (STATUS_CD), e ') | " ', START_TS =' | Decode (START_TS, null, "to_date('''|| to_char (START_TS,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")').
', END_TS =' | Decode (END_TS, null, "to_date('''|| to_char (END_TS,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")') |', DURATION = ' | NVL (TO_CHAR (DURATION), 'NULL') |', STATUS_DESC = "' | NVL (TO_CHAR (STATUS_DESC), 'NULL').
"', DBCONN_NAME =" ' | NVL (TO_CHAR (DBCONN_NAME), e ') | " ', SUCESS_ROWS =' | NVL (TO_CHAR (SUCESS_ROWS), 'NULL').
', FAILED_ROWS =' | NVL (TO_CHAR (FAILED_ROWS), 'NULL') |', ERROR_CODE = ' | NVL (TO_CHAR (ERROR_CODE), 'NULL') |', NUM_RETRIES =' | NVL (TO_CHAR (NUM_RETRIES), 'NULL').
', READ_THRUPUT =' | NVL (TO_CHAR (READ_THRUPUT), 'NULL') |', LAST_UPD = ' | Decode (LAST_UPD, null, "to_date('''|| to_char (LAST_UPD,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")') |', RUN_STEP_WID = "' | NVL (TO_CHAR (RUN_STEP_WID), 'NULL').
"', W_INSERT_DT = ' | Decode (W_INSERT_DT, null, "to_date('''|| to_char (W_INSERT_DT,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")') |', W_UPDATE_DT = ' | Decode (W_UPDATE_DT, null, "to_date('''|| to_char (W_UPDATE_DT,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")').
', START_DATE_WID =' | NVL (TO_CHAR (START_DATE_WID), 'NULL') |', END_DATE_WID = ' | NVL (TO_CHAR (END_DATE_WID), 'NULL') |', START_TIME =' |
NVL (TO_CHAR (START_TIME), 'NULL') |', END_TIME =' | NVL (TO_CHAR (END_TIME), 'NULL'). "WHERE INTEGRATION_ID ="' | INTEGRATION_ID | " « ; » AS a Column OF XXAFL_MON_FACTS_F;BEGIN
dbms_output.put_line (sysdate);
to record in a loop of the UPDdbms_output.put_line (record.col_name);
immediately run record.col_name;CNT: = cnt + 1;
If cnt > 1000
and then commit;
CNT: = 0;
dbms_output.put_line (sysdate);
end if;
end loop;
dbms_output.put_line (sysdate);
END; -ProcedureERRORS:
Error starting line: 1 at the controls.
PROCEDURE FACT_UPDATE
Error report-
Unknown commandError from line: 2 in command.
IS
Error report-
Unknown command
Error from line: 3 in command.
DECLARE
CNT: = 0;UPD CURSOR is
SELECT
'UPDATE XXAFL_MON_FACTS_F SET TASK_WID =' | NVL (TO_CHAR (TASK_WID), 'NULL') |', EXECUTION_PLAN_WID =' | NVL (TO_CHAR (EXECUTION_PLAN_WID), 'NULL').
', DETAILS_WID =' | NVL (TO_CHAR (DETAILS_WID), 'NULL') |', SOURCE_WID =' | NVL (TO_CHAR (SOURCE_WID), 'NULL') |', TARGET_WID = ' | NVL (TO_CHAR (TARGET_WID), 'NULL').
', RUN_STATUS_WID =' | NVL (TO_CHAR (RUN_STATUS_WID), 'NULL') |', SEQ_NUM =' | NVL (TO_CHAR (SEQ_NUM), 'NULL') |', NAME = "' | NVL (TO_CHAR (NAME), 'NULL').
"', NO_POSITION =" ' | NVL (TO_CHAR (INSTANCE_NUM), e ') | " ', INSTANCE_NAME = "' | NVL (TO_CHAR (INSTANCE_NAME), 'NULL').
"', TYPE_CD =" ' | NVL (TO_CHAR (TYPE_CD), e ') | " ', STATUS_CD = "' | NVL (TO_CHAR (STATUS_CD), e ') | " ', START_TS =' | Decode (START_TS, null, "to_date('''|| to_char (START_TS,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")').
', END_TS =' | Decode (END_TS, null, "to_date('''|| to_char (END_TS,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")') |', DURATION = ' | NVL (TO_CHAR (DURATION), 'NULL') |', STATUS_DESC = "' | NVL (TO_CHAR (STATUS_DESC), 'NULL').
"', DBCONN_NAME =" ' | NVL (TO_CHAR (DBCONN_NAME), e ') | " ', SUCESS_ROWS =' | NVL (TO_CHAR (SUCESS_ROWS), 'NULL').
', FAILED_ROWS =' | NVL (TO_CHAR (FAILED_ROWS), 'NULL') |', ERROR_CODE = ' | NVL (TO_CHAR (ERROR_CODE), 'NULL') |', NUM_RETRIES =' | NVL (TO_CHAR (NUM_RETRIES), 'NULL').
', READ_THRUPUT =' | NVL (TO_CHAR (READ_THRUPUT), 'NULL') |', LAST_UPD = ' | Decode (LAST_UPD, null, "to_date('''|| to_char (LAST_UPD,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")') |', RUN_STEP_WID = "' | NVL (TO_CHAR (RUN_STEP_WID), 'NULL').
"', W_INSERT_DT = ' | Decode (W_INSERT_DT, null, "to_date('''|| to_char (W_INSERT_DT,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")') |', W_UPDATE_DT = ' | Decode (W_UPDATE_DT, null, "to_date('''|| to_char (W_UPDATE_DT,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")').
', START_DATE_WID =' | NVL (TO_CHAR (START_DATE_WID), 'NULL') |', END_DATE_WID = ' | NVL (TO_CHAR (END_DATE_WID), 'NULL') |', START_TIME =' |
NVL (TO_CHAR (START_TIME), 'NULL') |', END_TIME =' | NVL (TO_CHAR (END_TIME), 'NULL'). "WHERE INTEGRATION_ID ="' | INTEGRATION_ID | " « ; » AS a Column OF XXAFL_MON_FACTS_F;BEGIN
dbms_output.put_line (sysdate);
to record in a loop of the UPDdbms_output.put_line (record.col_name);
immediately run record.col_name;CNT: = cnt + 1;
If cnt > 1000
and then commit;
CNT: = 0;
dbms_output.put_line (sysdate);
end if;
end loop;
dbms_output.put_line (sysdate);
END; -Procedure
Error report-
ORA-06550: line 2, column 6:
PLS-00103: encountered the symbol "=" when expecting one of the following conditions:constant exception < an ID >
< a between double quote delimited identifiers > double long Ref table
char time timestamp interval date binary national character
NCHAR
The symbol '< identifier >' has been substituted for "=" continue.
06550 00000 - "line %s, column % s:\n%s".
* Cause: Usually a PL/SQL compilation error.
* Action:
Error starting line: 1 at the controls.
PROCEDURE FACT_UPDATE
Error report-
Unknown commandError from line: 2 in command.
IS
Error report-
Unknown command
Error from line: 3 in command.
DECLARE
CNT NUMBER: = 0;UPD CURSOR is
SELECT
'UPDATE XXAFL_MON_FACTS_F SET TASK_WID =' | NVL (TO_CHAR (TASK_WID), 'NULL') |', EXECUTION_PLAN_WID =' | NVL (TO_CHAR (EXECUTION_PLAN_WID), 'NULL').
', DETAILS_WID =' | NVL (TO_CHAR (DETAILS_WID), 'NULL') |', SOURCE_WID =' | NVL (TO_CHAR (SOURCE_WID), 'NULL') |', TARGET_WID = ' | NVL (TO_CHAR (TARGET_WID), 'NULL').
', RUN_STATUS_WID =' | NVL (TO_CHAR (RUN_STATUS_WID), 'NULL') |', SEQ_NUM =' | NVL (TO_CHAR (SEQ_NUM), 'NULL') |', NAME = "' | NVL (TO_CHAR (NAME), 'NULL').
"', NO_POSITION =" ' | NVL (TO_CHAR (INSTANCE_NUM), e ') | " ', INSTANCE_NAME = "' | NVL (TO_CHAR (INSTANCE_NAME), 'NULL').
"', TYPE_CD =" ' | NVL (TO_CHAR (TYPE_CD), e ') | " ', STATUS_CD = "' | NVL (TO_CHAR (STATUS_CD), e ') | " ', START_TS =' | Decode (START_TS, null, "to_date('''|| to_char (START_TS,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")').
', END_TS =' | Decode (END_TS, null, "to_date('''|| to_char (END_TS,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")') |', DURATION = ' | NVL (TO_CHAR (DURATION), 'NULL') |', STATUS_DESC = "' | NVL (TO_CHAR (STATUS_DESC), 'NULL').
"', DBCONN_NAME =" ' | NVL (TO_CHAR (DBCONN_NAME), e ') | " ', SUCESS_ROWS =' | NVL (TO_CHAR (SUCESS_ROWS), 'NULL').
', FAILED_ROWS =' | NVL (TO_CHAR (FAILED_ROWS), 'NULL') |', ERROR_CODE = ' | NVL (TO_CHAR (ERROR_CODE), 'NULL') |', NUM_RETRIES =' | NVL (TO_CHAR (NUM_RETRIES), 'NULL').
', READ_THRUPUT =' | NVL (TO_CHAR (READ_THRUPUT), 'NULL') |', LAST_UPD = ' | Decode (LAST_UPD, null, "to_date('''|| to_char (LAST_UPD,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")') |', RUN_STEP_WID = "' | NVL (TO_CHAR (RUN_STEP_WID), 'NULL').
"', W_INSERT_DT = ' | Decode (W_INSERT_DT, null, "to_date('''|| to_char (W_INSERT_DT,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")') |', W_UPDATE_DT = ' | Decode (W_UPDATE_DT, null, "to_date('''|| to_char (W_UPDATE_DT,' jj/mm/aaaa hh) |")) ((', "dd/mm/yyyy hh")').
', START_DATE_WID =' | NVL (TO_CHAR (START_DATE_WID), 'NULL') |', END_DATE_WID = ' | NVL (TO_CHAR (END_DATE_WID), 'NULL') |', START_TIME =' |
NVL (TO_CHAR (START_TIME), 'NULL') |', END_TIME =' | NVL (TO_CHAR (END_TIME), 'NULL'). "WHERE INTEGRATION_ID ="' | INTEGRATION_ID | " « ; » AS a Column OF XXAFL_MON_FACTS_F;BEGIN
dbms_output.put_line (sysdate);
to record in a loop of the UPDdbms_output.put_line (record.col_name);
immediately run record.col_name;CNT: = cnt + 1;
If cnt > 1000
and then commit;
CNT: = 0;
dbms_output.put_line (sysdate);
end if;
end loop;
dbms_output.put_line (sysdate);
END; -Procedure
Error report-
ORA-00911: invalid character
ORA-06512: at line 24
00911 00000 - "invalid character".
* Cause: identifiers may not start with any character other than ASCII
letters and numbers. $# _ are allowed after the first
character. May contain identifiers surrounded by doublequotes
any character other than a quotation mark. Other quotes
(q' #... #') cannot use spaces, tabs or as carriage returns
delimiters. For all other settings, consult the SQL language
Reference manual.
* Action:In addition to the other reviews, and apart from the quality of the code, you should really (really!) learn how to format your code for better "read-ability. This will also contribute to a better quality. If you are unsure how to format, then use a development as a SQL developer tool. It will not format "as you type", but a frequent use of the shortened format keyboard (Ctrl + F7 in SQL Dev) will keep your code readable and coherent.
And then you learn to keep this format when you post on the forum.
Like this:
PROCEDURE FACT_UPDATE
IS
DECLARE
CNT NUMBER: = 0;
CURSOR UPD
IS
SELECT "UPDATE XXAFL_MON_FACTS_F SET TASK_WID ='"
|| NVL (TO_CHAR (TASK_WID), 'NULL')
|', EXECUTION_PLAN_WID ='
|| NVL (TO_CHAR (EXECUTION_PLAN_WID), 'NULL')
|| ', DETAILS_WID ='
|| NVL (TO_CHAR (DETAILS_WID), 'NULL')
|', SOURCE_WID ='
|| NVL (TO_CHAR (SOURCE_WID), 'NULL')
|', TARGET_WID = '
|| NVL (TO_CHAR (TARGET_WID), 'NULL')
|| ', RUN_STATUS_WID ='
|| NVL (TO_CHAR (RUN_STATUS_WID), 'NULL')
|', SEQ_NUM ='
|| NVL (TO_CHAR (SEQ_NUM), 'NULL')
|', NAME = "'
|| NVL (TO_CHAR (NAME), 'NULL')
|| ' ', NO_POSITION = "'
|| NVL (TO_CHAR (INSTANCE_NUM), 'NULL')
||'' ', INSTANCE_NAME = "'
|| NVL (TO_CHAR (INSTANCE_NAME), 'NULL')
|| ' ', TYPE_CD = "'
|| NVL (TO_CHAR (TYPE_CD), 'NULL')
||'' ', STATUS_CD = "'
|| NVL (TO_CHAR (STATUS_CD), 'NULL')
||'' ', START_TS ='
|| DECODE (START_TS, ",' to_date(''e))
|| To_char (START_TS, "mm/dd/yyyy hh)
||'' ((', "dd/mm/yyyy hh")')
|| ', END_TS ='
|| DECODE (END_TS, ",' to_date(''e))
|| To_char (END_TS, "mm/dd/yyyy hh)
||'' ((', "dd/mm/yyyy hh")')
|', DURATION = '
|| NVL (TO_CHAR (DURATION), 'NULL')
|', STATUS_DESC = "'
|| NVL (TO_CHAR (STATUS_DESC), 'NULL')
|| ' ', DBCONN_NAME = "'
|| NVL (TO_CHAR (DBCONN_NAME), 'NULL')
||'' ', SUCESS_ROWS ='
|| NVL (TO_CHAR (SUCESS_ROWS), 'NULL')
|| ', FAILED_ROWS ='
|| NVL (TO_CHAR (FAILED_ROWS), 'NULL')
|', ERROR_CODE = '
|| NVL (TO_CHAR (ERROR_CODE), 'NULL')
|', NUM_RETRIES ='
|| NVL (TO_CHAR (NUM_RETRIES), 'NULL')
|| ', READ_THRUPUT ='
|| NVL (TO_CHAR (READ_THRUPUT), 'NULL')
|', LAST_UPD = '
|| DECODE (LAST_UPD, ",' to_date(''e))
|| To_char (LAST_UPD, "mm/dd/yyyy hh)
||'' ((', "dd/mm/yyyy hh")')
|', RUN_STEP_WID = "'
|| NVL (TO_CHAR (RUN_STEP_WID), 'NULL')
|| ' ', W_INSERT_DT = '
|| DECODE (W_INSERT_DT, ",' to_date(''e))
|| To_char (W_INSERT_DT, "mm/dd/yyyy hh)
||'' ((', "dd/mm/yyyy hh")')
|', W_UPDATE_DT = '
|| DECODE (W_UPDATE_DT, ",' to_date(''e))
|| To_char (W_UPDATE_DT, "mm/dd/yyyy hh)
||'' ((', "dd/mm/yyyy hh")')
|| ', START_DATE_WID ='
|| NVL (TO_CHAR (START_DATE_WID), 'NULL')
|', END_DATE_WID = '
|| NVL (TO_CHAR (END_DATE_WID), 'NULL')
|', START_TIME ='
|| NVL (TO_CHAR (START_TIME), 'NULL')
|', END_TIME ='
|| NVL (TO_CHAR (END_TIME), 'NULL')
||' WHERE INTEGRATION_ID = "'
|| INTEGRATION_ID
||''';' AS Column
OF XXAFL_MON_FACTS_F;
BEGIN
dbms_output.put_line (sysdate);
FOR registration in UPD
LOOP
dbms_output.put_line (record.col_name);
EXECUTE immediate record.col_name;
CNT: = cnt + 1;
IF cnt > 1000 THEN
COMMIT;
CNT: = 0;
dbms_output.put_line (sysdate);
END IF;
END LOOP;
dbms_output.put_line (sysdate);
END; -Procedure
-
How to check the existence of a value in a table before copying the data?
Experts,
I have a requirement in which I need to copy data (4 columns) table A to table B (4 columns)
Table A (entry)
PART_ID PART_NAME PART_OPT_CD ENGG_OPT_CD
1 "AAA" 10 100
2 'BBB' 20 200
3 'CCC' 30 300
4 'DDD' 40 400
5 'EEE' 50 500
I have a table named OPTIONS with a single column. This is a table of reference of business which has the master list of option codes.
OPT_CD
10
20
30
50
60
100
200
400
500
I need to copy Table A to Table B, but in doing so, I need to check the values of columns 3 and 4 in the OPTIONS array.
If there is copy the folder B. Otherwise error in the log in a file/table and continue with the next copy
TABLE B (exit)
PART_ID PART_NAME PART_OPT_CD ENGG_OPT_CD
1 "AAA" 10 100
2 'BBB' 20 200
5 'EEE' 50 500
WARNING file or a table should have the details below.
300 ENGG_OPT_CD does not exist in the table OPTIONS, so part_id 3 have not migrated
40 PART_OPT_CD does not exist in the table OPTIONS, then part_id 4 have not migrated
Company don't bother about the format of error, we need this information to correct the OPT_CD in the OPTIONS table.
Can anyone suggest a better way to do this. Thank you for your help in advanceHello
Its very similar to your previous post.
Re: PL/SQL help
The only difference being that you have to outer join to your superimposed master table, since your search in two columns values occur only in a single column on your Master table.Something like that;
create table a (part_id number, part_name varchar2(10),part_opt_cd number,engg_opt_cd number); insert into a (select 1 Part_ID, 'AAA' Part_Name, 10 Part_Opt_CD, 100 ENGG_Opt_CD from dual union all select 2, 'BBB', 20, 200 from dual union all select 3, 'CCC', 30, 300 from dual union all select 4, 'DDD', 40, 400 from dual union all select 5, 'EEE', 50, 500 from dual union all select 6, 'FFF', 60, 500 from dual ) / create table b (part_id number, part_name varchar2(10),part_opt_cd number,engg_opt_cd number); insert into b (select 1 Part_ID, 'AAA' Part_Name, 10 Part_Opt_CD, 100 ENGG_Opt_CD from dual union all select 2, 'BBB', 20, 200 from dual union all select 5, 'EEE', 50, 500 from dual ) / Create table master (OPT_CD number); insert into master ( select 10 opt_cd from dual union all select 20 from dual union all select 30 from dual union all select 50 from dual union all select 60 from dual union all select 100 from dual union all select 200 from dual union all select 400 from dual union all select 500 from dual ) / create table log_msg (msg varchar2(100) ,t timestamp default current_timestamp) / SQL> insert all 2 when Master1_ID is not null and 3 Master2_ID is not null then 4 into b (Part_ID, Part_Name, Part_Opt_CD, ENGG_Opt_CD) 5 values (Part_ID, Part_Name, Part_Opt_CD, ENGG_Opt_CD) 6 when Master1_ID is null or 7 Master2_ID is null then 8 into log_msg (msg) values (Part_Opt_CD || ' ' || ENGG_Opt_CD || ' does not exist on the Master table') 9 select m1.Opt_CD as Master1_ID 10 ,m2.Opt_CD as master2_ID 11 ,a.Part_ID as Part_ID 12 ,a.Part_Name as Part_Name 13 ,a.Part_Opt_CD as Part_Opt_CD 14 ,a.ENGG_Opt_CD as ENGG_Opt_CD 15 from ( 16 select a.Part_ID, a.Part_Name, a.Part_Opt_CD, a.ENGG_Opt_CD 17 from a 18 left outer join b on a.Part_ID = b.Part_ID 19 where b.Part_ID is null 20 ) a 21 left outer join master m1 on a.Part_Opt_CD = m1.Opt_CD 22 left outer join master m2 on a.ENGG_Opt_CD = m2.Opt_CD 23 / 3 rows created. SQL> select * from log_msg; MSG T ------------------------------------------- ------------------------- 40 400 does not exist on the Master table 05-OCT-11 09.44.17.621000 30 300 does not exist on the Master table 05-OCT-11 09.44.17.621000 SQL> select * from b; PART_ID PART_NAME PART_OPT_CD ENGG_OPT_CD ---------- ---------- ----------- ----------- 1 AAA 10 100 2 BBB 20 200 5 EEE 50 500 6 FFF 60 500
Note, I have included an additional line in table A in order to prove that the INSERTION will occur in table B. Errors, as you can see have been inserted in the table LOG_MSG.
Published by: bluefrog October 5, 2011 09:48
-
The computer hangs when copying the data on the hard drive
* Problem *:
My computer freezes whenever I have transfer large amounts_ of the data on the disc from my computer. * It doesn't have this problem with my C drive *.
First detected this problem while I was transferring some data in LAN. This problem occurs even when I copy data to my C drive to the D drive.
Action taken:
-Performed a full scan of my computer, found some viruses, but the problem persists
-Do you have a check disk via Windows, as well as the TuneUp utility, no problem.Data sheet:
OS: Windows 7 Professional 32-bit
Processor: Intel Core 2 Duo t7200 @ 2.00GHz
RAM: 1 GB DDR2 - SDRAM
Hard drive: TOSHIBA MK1234GSX ATA Device(120GB)
No partitions: 2Hello
It of difficult to say what might be wrong here but if the question appears only using the second partition, then I recommend to check the State of the HARD drive.
I use a very good freeware tool called Drive Fitness Test.
Use google to download this software.It creates a boot disk that allows you to test the drive HARD and of course the two partitions.
If the error would be detected, then it means that the HARD drive failure could be the reason for this -
copy the data from the columns box
Hi all, I have multicolumn listbox and I deleted all the lines both vertical and horizontal lines and columns headers.when while, I run my vi, some string data are introduced into the list box. However when I try to copy a line of string in the drop-down list, I am unable to do (I can't select a line,... the idea is to select a row in the list box so that I can paste it somewhere else... That's how am supposed to allow some feature of the list box to be able to do this... any help? Thanks already
Hello
If I understand your problem, you want to copy the values of time and the description at once and paste the entire line in a txt for example, no? Unfortunately, the listbox is as an array of 2D channels and each field is a different value of this table 2D. You can copy a value at the time when the VI does not RUN otherwise you can use a property node to display the name of items and that the copy and paste values (always a time value) also using the VI.
I hope the information is useful for your application
Concerning
Mario
-
Coding help - copy the date and the subject of the e-mail
If I wanted to create a menu button that allows you to copy the object (and possibly date) of the email message that is highlighted, it is extremely difficult to achieve? I was told that the BIS, it is very delicate.
Thanks for any help
If you have no experience of java, then you should probably start learning java. Get a java book and work through the sample code provided with Eclipse everything first.
There are a few books entry on Blackberry Java development - start here. The books of J2SE will confuse you by introducing libraries that are not part of Java fo distribution the BB.
You can also take a look at Peter tutorials (search the Forum - Peter Strange)
-
* Original title: data is not copied to the USB
I'm trying to copy some materials in pen drive then a message appears and data are not copied the message is allowed to perform this actionand need you
Data is copied from the pd to the system. How can we solve this problem? Please help me.
Of aranjo
Hi aranjo,
I will definitely help you with this.
I suggest you to refer to suggestions provided by Nirmal S on 24 November 2012 and check.
If the problem persists or you have any other questions, do not hesitate to let us know. It is our pleasure to be of service.
Thank you.
Maybe you are looking for
-
CHKDSK error after replacing screen
Hi all I have an old T60, I am preparing to give to my mother. To get this loan, I have replaced the screen SXGA + dead with a XGA almost nine. Everything went well, the new screen is beautiful and probably better for my mother, since there res more
-
Connection problems with Arduino
Hi all I try to get serial with my Arduino board, but I have a few problems. The card is programmed to read data series to turn on LEDs and switch off. It works with the monitor serial Arduino to COM4. But when I try to write similar instructions wit
-
Ability to bookmark pages when you are finished listening?
Am very new to the Zip Clip and would try to listen to a book. My question is - it Clip Zip has the ability to mark the point that I stopped listening to? Gene
-
AutoPlay does not open when opening a CD or a DVD.
my dvd writer opens to install the software but will not play a cd or a dvd unless I do it manually, would it be the registry Original title: my dvd burner that opens upward to install software but will not play a cd or dvd unless I do it manually
-
In Vista, all files lost association, constantly asked what program to open a file with
First of all, whenever I try to open certain files, such as Internet Explorer, paint, or whatever it is, I get the "choose the program you want to use to open this file", and it has not happened before. Along with this, the little thing bar in the lo