Procedure for Antenna replacement on 1522 Outdoor AP
Is disabling the radios on the antenna enough to replace the existing 3 of the 2.4 Ghz antenna with a different model?
Not sure if I need to shutdown the power by unplugging the POE cable from Power Injector and RESET the button to also stop the battery power.
Cisco's radios and antennae are field replaceable. You can just replacement even when the radios are enabled or the AP's are still powered up.
If you don't want to power down your AP, shutting down the radios is another option. It's alot faster.
Similar Messages
-
hi can anone answer the question i have asked ??
Ques: Hi, I have a Iphone 5. Its a little physically damaged at corders of steel band and now its not getting boot up. I am from INDIA and what to know what is the excat procedure for my phone replacement. Phone is under warranty.goelAkash wrote:
now who is responsible ?? I think the apple care people are responsible as the phone was charging when they cleaned that charging jack. fault is at their end.
It doesn't matter that the damage doesn't appear to be related to the problem you're having. Once the phone is damaged, the warranty is void.
Forum etiquette note: you don't need to post the identical response three times.
Best of luck. -
Can I ask for a replace meant of iMac since yjere is a failure of one part every month. Last month lcd replied now optical drive.
Imac 27".
i do not like the idea of repairing every month.
Feel the imacs supplied to India are sub standard onesFolks have reported that the Apple policy is three major component failures and the Mac is replaced. For the first two the Mac is repaired. Apple would not risk alienating its customers from one of the most populated nations in the world, so its time to stop the "discriminating against the poor Indians and selling us sub-standard Macs" routine. Occasionally the universe aligns just right for there to be a Mac lemon. Folks in every country have experienced lemons. It is the hazard of manufacturing millions of Macs with even more millions of parts, all produced by different parts suppliers. And it is why the manufacturer's warranty exists.
Speak to the vender about a replacement. If necessary call Apple Care and request that your warranty service call be escalated to Customer Relations. Politely, but firmly, explain the situation and stand your ground that the solution to make you a happy customer is to have the Mac replaced. Don't make threats, mention lawyers or claim that Apple discriminates against Indians. If you do, you will have lost your case and Apple will then work with you from a distance and follow it policies and procedures to the letter, regardless of whether it makes you happy. -
Stored Procedure for Crystal Reports
Hi All,
I developed this test stored procedure to see wheather we could a stored procedure for crystal reports. It compiled without any problem, but when I run it, it gives me error message. Here is the stored Procedure..
CREATE OR REPLACE PROCEDURE WOLD1SIM.TEST_PROCEDURE(
TEST_CURSOR IN OUT TEST_PACKAGE.TEST_TYPE,
TEST_PARAMETER IN TEST_TABLE.ID%TYPE)
AS
BEGIN
OPEN TEST_CURSOR FOR
SELECT *
FROM TEST_TABLE
WHERE TEST_TABLE.ID = TEST_PARAMETER;
END TEST_PROCEDURE;
And
This is the error message..
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00201: identifier 'TEST_PROC' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
I have created the package sucessfully.
I was wondering If any one of you can advice me where I am making the mistake.
Thank youCREATE OR REPLACE PROCEDURE WOLD1SIM.TEST_PROCEDURE(TEST_CURSOR IN OUT TEST_PACKAGE.TEST_TYPE,
TEST_PARAMETER IN TEST_TABLE.ID%TYPE)
...you have 2 parameters in your procedure WOLD1SIM.TEST_PROCEDURE(). you should also use two parameters when you execute the procedure. -
I created a stored procedure for send data from a source bd to the bd destination with a link between BD
But it will not work
CREATE OR REPLACE PROCEDURE archivage ( source IN VARCHAR2, destination IN VARCHAR2)
BEGIN
/ * - Prepare a cursor to select from the bd_source: * /
source_cursor: = dbms_sql.open_cursor;
DBMS_SQL.PARSE (source_cursor,
'SELECT table_name FROM dba_tables' | | source,DBMS_SQL.NATIVE);
LOOP i in source_cursor
/* Or i use this !!!!
SELECT object_name FROM dba_objects WHERE owner = 'SCOTT' AND object_type = 'TABLE'*/
DBMS_SQL.DEFINE_COLUMN (source_cursor, i);
end loop
ignorer: DBMS_SQL.EXECUTE = (source_cursor);
/ * - Prepare a cursor to insert into the destination db: * /
destination_cursor: = DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE (destination_cursor,
'INSERT INTO' | | destination | | DBMS_SQL.NATIVE);
/ * - Fetch a row from the source table and insert it into the destination table: * /
loop
if DBMS_SQL.FETCH_ROWS (source_cursor)> 0 ALORS
- Obtenir des valeurs de colonne de la ligne
DBMS_SQL.COLUMN_VALUE (source_cursor,i);
DBMS_SQL.BIND_VARIABLE (destination_cursor,i);
ignorer: DBMS_SQL.EXECUTE = (destination_cursor);
ELSE
EXIT;
End If;
END LOOP;
/*-Close cursor */
COMMIT;
DBMS_SQL.CLOSE_CURSOR (source_cursor);
DBMS_SQL.CLOSE_CURSOR (destination_cursor);
EXCEPTION
WHEN OTHERS, THEN
if
DBMS_SQL.IS_OPEN (source_cursor)then
DBMS_SQL.CLOSE_CURSOR (source_cursor);
End If;
if DBMS_SQL.IS_OPEN (destination_cursor) then
DBMS_SQL.CLOSE_CURSOR (destination_cursor);
End If;
RAISE;
END;find 10 differences ... :(
CREATE OR REPLACE PROCEDURE archivage (source IN VARCHAR2,
destination IN VARCHAR2)
IS
source_cursor INTEGER;
destination_cursor INTEGER;
ignorer INTEGER;
BEGIN
/* - Prepare a cursor to select from the bd_source: */
source_cursor := DBMS_SQL.open_cursor;
DBMS_SQL.
PARSE (source_cursor,
'SELECT table_name FROM dba_tables' || source,
DBMS_SQL.NATIVE);
FOR i IN source_cursor
LOOP
/* Or i use this !!!!
SELECT object_name FROM dba_objects WHERE owner = 'SCOTT' AND object_type = 'TABLE'*/
DBMS_SQL.DEFINE_COLUMN (source_cursor, i);
END LOOP;
ignorer := DBMS_SQL.EXECUTE (source_cursor);
/* - Prepare a cursor to insert into the destination db: */
destination_cursor := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.
PARSE (destination_cursor,
'INSERT INTO ' || destination,
DBMS_SQL.NATIVE);
/* - Fetch a row from the source table and insert it into the destination table: */
LOOP
IF DBMS_SQL.FETCH_ROWS (source_cursor) > 0
THEN
--ALORS
-- Obtenir des valeurs de colonne de la ligne
DBMS_SQL.COLUMN_VALUE (source_cursor, i);
DBMS_SQL.BIND_VARIABLE (destination_cursor, i);
ignorer := DBMS_SQL.EXECUTE (destination_cursor);
ELSE
EXIT;
END IF;
END LOOP;
/*-Close cursor */
COMMIT;
DBMS_SQL.CLOSE_CURSOR (source_cursor);
DBMS_SQL.CLOSE_CURSOR (destination_cursor);
EXCEPTION
WHEN OTHERS
THEN
IF DBMS_SQL.IS_OPEN (source_cursor)
THEN
DBMS_SQL.CLOSE_CURSOR (source_cursor);
END IF;
IF DBMS_SQL.IS_OPEN (destination_cursor)
THEN
DBMS_SQL.CLOSE_CURSOR (destination_cursor);
END IF;
RAISE;
END;
/ -
Stored Procedure for Batch Number Format and Block Duplicate Batch Number
Hi Experts !
I am new one in forum asking question.. I want Stored procedure for Batch Number Format. I want fix one Batch number format in Stored Procedure.
Example :
My Batch number format Like BATCH00001 - It should be first five digit is text format and next five is Numeric.
IF create Goods receipt PO or Goods receipt stage I create batch number like BATCH 00001 or any other number means don't add that document and also duplicated batch number also does not allowed. please give me the solutions. I am sorry for my bad english .Dear Nagarajan K.
Thanks for your replay ..
IF @transaction_type IN ('A','U') AND (@object_type = '106' )
BEGIN
set @item = LEFT( @list_of_cols_val_tab_del, CHARINDEX(CHAR(9), @list_of_cols_val_tab_del,1) - 1)
set @batch = substring(@list_of_cols_val_tab_del, len(@item)+1, (CHARINDEX(CHAR(9), @list_of_cols_val_tab_del,len(@item)+2)) - (len(@item)+1))
--set @base =( select basetype from ibt1 where batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
set @count = (select count(*) from oibt quantity > 0 and where batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
if @count > 1
begin
set @error = 1
set @error_message = 'Please enter different Batch Code for batch ''' + @batch + ''' for item ' + @item
select @error, @error_message
END
END
I used above Stored Procedure. here we can use one batch number for different item but i want to block one batch we should use one item and one time only after than we never use that batch number for same item and another item.
After that I want format for Batch, we should follow unique Batch number for all items. -
Stored procedure for disabling all foreign key constraints ?
hi all,
I need a stored procedure for disabling / enable all constraints in that database schema.
Create or replace procedure enable_disable_proc(status varchar2(3),schema_name varchar2(20))
---> where 'status' parameter condition should be ( YES for enable) (NO for disable)
---> 'schema_name' is a parameter where ,only this schema should be affected with this procedure..
Thanks in Advance..Hi,
Try this code
/* Formatted on 2009/07/16 08:15 (Formatter Plus v4.8.8) */
CREATE PROCEDURE enab_disab_proc (
enforce IN VARCHAR2,
current_schema IN VARCHAR2
IS
v_alter_table_sql VARCHAR2 (2000);
BEGIN
FOR rec_con IN (SELECT table_name, constraint_name
FROM user_constraints
WHERE owner = current_schema)
LOOP
IF (enforce = 'NO')
THEN
v_alter_table_sql :=
' alter table '
|| current_schema
|| '.'
|| rec_con.table_name
|| ' disable constraint '
|| rec_con.constraint_name;
ELSE
v_alter_table_sql :=
' alter table '
|| current_schema
|| '.'
|| rec_con.table_name
|| ' enable constraint '
|| rec_con.constraint_name;
END IF;
EXECUTE IMMEDIATE v_alter_table_sql;
END LOOP;
END;Edited by: Salim Chelabi on 2009-07-16 05:15 -
Procedure for multiple DB Links
Hi Everybody,
Hope everyone is doing fine. I am working on oracle 11g R2. I have one scenario on which i need your help guys. We need to have one one stored procedure which has comma seprated Database Links as IN parameter. This procedure has one update statement. So whatever multiple database links we will pass, this update statement needs to run only on those databases . Can you please help for options we can do to solve this scneario?
It will something like this:
CREATE OR REPLACE PROCEDURE TEST_SP(DB_LINKS_IN VARCHAR2, E_MGR_IN VARCHAR2, E_ID_IN NUMBER)
AS
V_SQL VARCHAR2(400);
BEGIN
V_SQL: = 'UPDATE EMPLOYEE@'||DB_LINKS_IN
SET EMP_MANAGER='||''''||E_MGR_IN||''''||'
WHERE EMP_ID ='||E_ID_IN||;
EXECUTE IMMEDIATE (V_SQL);
END TEST SP;
Above update statement needs to run in loop for Database links coming as comma seprated value from IN parameter DB_LINKS_IN. Can you please help in how to modify above procedure for DB links coming as comma seprated value?
I will greatly appreciate your comments and responses.
Regards
DevYou could try the following steps:
1. Create type
CREATE OR REPLACE TYPE MYSTRTABLETYPE AS TABLE OF VARCHAR2 (255);
2. Create function to parse comma-delimited list of db links:
CREATE OR REPLACE FUNCTION IN_STRLIST( P_STRING IN VARCHAR2 ) RETURN MyStrTableType
AS
L_STRING VARCHAR2(32000) DEFAULT P_STRING || ',';
L_DATA MyStrTableType := MyStrTableType();
N NUMBER;
BEGIN
LOOP
EXIT WHEN L_STRING IS NULL;
N := INSTR( L_STRING, ',' );
L_DATA.EXTEND;
L_DATA(L_DATA.COUNT) :=
LTRIM( RTRIM( SUBSTR( L_STRING, 1, N-1 ) ) );
L_STRING := SUBSTR( L_STRING, N+1 );
END LOOP;
RETURN L_DATA;
END;
3. Modify your procedure as follows:
CREATE OR REPLACE PROCEDURE TEST_SP(DB_LINKS_IN VARCHAR2, E_MGR_IN VARCHAR2, E_ID_IN NUMBER)
AS
V_DB_LINK MYSTRTABLETYPE := MYSTRTABLETYPE ();
V_SQL VARCHAR2(400);
BEGIN
V_DB_LINK := IN_STRLIST(DB_LINKS_IN);
for i in 1..V_DB_LINK.count
loop
V_SQL: = 'UPDATE EMPLOYEE@'||V_DB_LINK(i)||
' SET EMP_MANAGER='||''''||E_MGR_IN||''''||
' WHERE EMP_ID ='||E_ID_IN||;
EXECUTE IMMEDIATE (V_SQL);
end loop;
END TEST SP;
Please note I have not tested the code. Also you might want to consider using bind variables for the EMP_ID and EMP_MANAGER values. -
My iphone 3G only gets wifi if its within 1 ft of the router. I have had the antenna replaced but its no better. I have restored to factory through iTunes but still not working. 3G signal is good
Try these steps. Check to see if your router has a firmware update. Go to the manufacturers website and check. If so, install. If not, reset the router. Disconnect from power for 30 seconds, plug it back in. Wait for it to boot up and then check your wifi.
Do a reset on the phone. Hold the sleep/wake and home buttons together until you see the Apple logo and then release. After the phone restarts, check wifi.
If none of this helps, then make an appointment at the Apple store to have the hardware checked. If it is found to have a hardware defect, they will more than likely replace the device. Remember the final call is Apple's. -
Blob type parameter in procedure for display issue. Oracle portal bug?
Hi Guy,
I am not sure this is a bug or not for oracle portal.
I have a table that have a column type as blob.
by oracle portal10g, this column should be display as Item Type Upload (Binary) at Item Level Options.
We can create a form to display this file and modify it.
However, It can not to use a procedure with a blob column to create the same form as above. we can not find Item Type as Upload (Binary) in form. if we choose text area.
We will get a error "ORA-01403: no data found (WWV-11230)"
We find this issue during convert clob column to blob type in procedure for a form using.
This is a simple procedure.
See below source codes:
Thanks for any help.
create or replace Procedure test_file
( p_DOCUMENT_ID IN OUT file.DOCUMENT_ID%type,
p_USER_ID out file.USER_ID%type,
p_DOCUMENT_NAME out file.DOCUMENT_NAME%type,
p_DOCUMENT out blob,
p_CREATED_BY out file.CREATED_BY%type,
p_CREATED_TIMESTAMP out file.CREATED_TIMESTAM%type,
p_UPDATED_BY out file.UPDATED_BY%type,
p_UPDATED_TIMESTAMP out file.UPDATED_TIMESTAMP%type,
p_DOCUMENT_DESC out file.DOCUMENT_DESC%type) as
L_DOCUMENT BLOB;
begin
begin
SELECT USER_ID , DOCUMENT_NAME,DOCUMENT, DOCUMENT_MIME, CREATED_BY, CREATED_TIMESTAMP,
UPDATED_BY , UPDATED_TIMESTAMP, DOCUMENT_DESC
INTO p_USER_ID , p_DOCUMENT_NAME,L_DOCUMENT, p_DOCUMENT_MIME, p_CREATED_BY, p_CREATED_TIMESTAMP,
p_UPDATED_BY , p_UPDATED_TIMESTAMP, p_DOCUMENT_DESC
FROM file
WHERE DOCUMENT_ID = p_DOCUMENT_ID;
exception
when NO_DATA_FOUND then
null;
end;
p_DOCUMENT :=L_DOCUMENT;
exception
when others then
null;
end;Hi,
I have created a vo with transient attributes and attached the vo to the am.
But when I am trying to insert the row from my collection, it is giving me '
oracle.jbo.NoDefException: JBO-25058: Definition of resField of type Attribute not found in ResVO
But I have the transient attribute resField in my ResVO and I attached the same to AM also
I am trying to get the VO in my controller like the below:
OAViewObject resvo = (OAViewObject) am.findViewObject("ResVO");
if(vo==null)
resvo = am.createViewObject("ResVO","xxcust.oracle.apps.xxcust.server.ResVO");
if(vo!= null)
resvo.executeQuery();
//Creating and inserting values into the vo
Row row = resvo.createRow();
resvo.insertRow(row);
row.setAttribute("resField", "AB");
row.setAttribute("Value", "CD");
row.setAttribute("Desc", "Test");
When I am running my page, I am getting the
oracle.jbo.NoDefException: JBO-25058: Definition of resField of type Attribute not found in ResVO
I checked the spelling and the attribute name is correct.
Is it the problem with VO having all the transient attributes or am I missing something?
I appreciate your help... -
Release procedure for p.o.
hi sapgurus,
here is the scenario,
i have as issue ( for P.O value only)
1) if the value is < 2 lacks then one person will release.
2) if the value is > 2 lacks then 2 persons will releasehi,
3.4.24 Releasing Procedure for Purchase Documents
Use
This setting is incorporated to just give demonstration of how SAP Release procedure works. The aim of this procedure is to replace manual written authorization procedures using signatures by an electronic one, while maintaining the dual Ctrl principle. The person responsible processes the purchasing document in the system, thereby marking it with an "electronic signature" which can give the document legal force.
3.4.24.1 Creation of Characteristics
Procedure
1. Access the activity using one of the following navigation options:
IMG Menu Materials Management Purchasing Purchase Order Release Procedure for Purchase Orders Edit Characteristic
Transaction Code CT04
2. On the Characteristic screen, make the following entries.
3. In put POVAL in filed Characteristic and choose Create (White paper) icon or Ctrl + F3 to begin creation of characteristic.
Field name Description User action and values Note
Select Addnl Data tab
Table Name Table Name CEKKO
Field Name Field Name GNETW
Choose Enter to continue, system will give an information message saying Format Data taken from ABAP dictionary, Choose Enter again to continue.
Select Basic Data tab
Description Description Total net order value
Status Status Released
Data Type Data type Currency format Selected by system
Number of characters Number of characters 15
Decimal places Decimal places 2
Currency Currency INR
Interval vals allowed Interval values allowed Check this tick box
Multiple Values Multiple values allowed Select this radio button
4. Choose Enter to complete the entries
5. Choose Save icon or Ctrl + S to save the characteristic.
3.4.24.2 Creation of Class
Procedure
1. Access the activity using one of the following navigation options:
IMG Menu Materials Management Purchasing Purchase Order Release Procedure for Purchase Orders Edit Class
Transaction Code CL02
2. On the Class screen, make the following entries:
Field name Description User action and values Note
Class Class PORELPROC
Class Type Class Type 032
Choose Create icon or white paper icon to create new class.
Description Description Purchase Order Release Procedure
Status Status Released
Choose Char. Tab to input characteristic name.
Characteristic Characteristic POVAL Created in above step
3. Choose Enter to complete the entries
4. Choose Save icon or Ctrl + S to save the characteristic.
Result
Class type 032: Class PORELPROC created.
3.4.24.3 Configuration of Release Procedure
Procedure
1. Access the activity using one of the following navigation options:
IMG Menu Materials Management Purchasing Purchase Order Release Procedure for Purchase Orders Define Release Procedure for Purchase Orders
Transaction Code SPRO
2. On executing the transaction system will give a popup screen choose Release Groups, system will display Change View u201CRelease Groups: External Purchasing Documentu201D: Overview.
3. Choose New Entries icon and make the following entries:
Field name Description User action and values Note
Rel. Group Release Group 02
Class Class Name PORELPROC Created in above step
Description Description PO Release Procedure
4. Choose Enter to complete the entries
5. Choose Save icon or Ctrl + S to save the entries.
6. Choose yellow arrow to go back to popup screen.
7. Choose Release Codes to select.
8. Choose New Entries icon and make the following entries:
Field name Description User action and values Note
Grp Release group 02 Created in above step
Code Release Code 01
Workflow Workflow Leave it blank
Description Description Purchase Officer
Grp Release group 02 Created in above step
Code Release Code 02
Workflow Workflow Leave it blank
Description Description Materials Manager
9. Choose Enter to complete the entries
10. Choose Save icon or Ctrl + S to save the entries.
11. Choose yellow arrow to go back to popup screen.
12. Choose Release indicator to select.
13. Choose New Entries icon and make the following entries:
Field name Description User action and values Note
Release ind. Release Indicator 1
Released Released Leave it blank
Chgable Changeability 4
Value change % Change of value 10%
Description Description Purchase Order Blocked
Go to 2nd line and input the following values:
Release ind. Release Indicator 2
Released Released Select Check box
Changeable Changeability 6
Description Description Purchase Order Released
14. Choose Enter to complete the entries
15. Choose Save icon or Ctrl + S to save the entries.
16. Choose yellow arrow to go back to popup screen.
17. Choose Release Strategies to select.
18. Choose New Entries icon and make the following entries:
19. System will give new screen New Entries: Details of Added Entries
Field name Description User action and values Note
Release Group Release group 02
Rel. Stategy Release Strategy S1
Capital Items Release
Release Code Release Code 1 01
Release Code Release Code 2 02
20. Choose Enter to complete the entries.
21. Choose Release prerequisites icon and select check box 02 at the bottom and choose Enter.
22. Choose Release statuses icon, system will give a popup screen system will default 1, 1 and 2 entries one by one as a default. Choose Continue.
23. Choose Classification icon, here you can see Total net order value is displayed, please input >= 1.00 INR value in the white placed and choose Enter.
24. Choose Next Screen icon or choose F8 to continue.
25. If you want to simulate the release procedure you can choose Release Simulation icon.
26. Choose Enter to complete the entries.
27. To save the settings choose Save icon or Ctrl + S.
Result
Release procedure is saved.
3.4.24.4 Assignment of Values to Release Procedure
As a default all the purchase documents >= Rs. 1000000.00 is suggested in the following step of release procedure, if you want to have different one you need to change the value in the following step. If you do not want release procedure you may change the value to Zero.
Procedure
1. Access the activity using one of the following navigation options:
IMG Menu Cross-Application Components Classification System Assignments Assign Object to Classes
Transaction Code CL20N
2. On the Class screen, make the following entries:
Field name Description User action and values Note
Class Type Class Type 032
Choose Enter to Assign values.
Release group Release Group 02
Rel. Strategy Release strategy S1
Choose Enter.
System will give Class name in Assignments, Double choose Class Name.
System will display Characteristic name Total net order value. Assign the value >= 1000000.00 INR against filed Value.
3. Choose Enter to complete the entries
4. Choose Save icon or Ctrl + S to save the characteristic.
Follow these steps
G.Ganesh Kumar -
Please review procedure for performance tuning
Hi Friends,
I have a procedure, which is taking lot of time for execution. Please help me how can i tune this procedure to reduce the execution time.
Purpose of the procedure : This procedure runs every data to load data from DWH to Data Marts,
We have some adverse keywords given by business in the table CFG_ADVERSE_KEYWORD ,the procedure will identify the keywords in the tables like df_call_ae_vd, in the notes column and loads only records which has adverse keywords.
Below is the procedure
create or replace procedure LOAD_DM_AE_DATA_PRC
as
v_insert_count NUMBER := 0;
/* current_process identifies the block of code where exception is raised, used for debugging */
v_current_process VARCHAR2(100) := NULL;
v_error_code VARCHAR2(8) := NULL;
v_error_text VARCHAR2(110) := NULL;
v_error_msg VARCHAR2(500) := NULL;
v_error_count NUMBER := 0;
/* module_name is the procedure name */
v_module_name VARCHAR2(50) := 'LOAD_DM_AE_DATA_PRC';
/* table_name is the target table truncated and loaded by the procedure */
v_table_name VARCHAR2(50) := NULL;
v_table_name1 VARCHAR2(50) := 'MM_USER_AE_VD';
v_table_name2 VARCHAR2(50) := 'MF_CALL_AE_VD';
v_table_name3 VARCHAR2(50) := 'MM_CHANGE_REQUEST_AE_VD';
v_table_name4 VARCHAR2(50) := 'MM_COMPETITOR_INSIGHT_AE_VD';
v_table_name5 VARCHAR2(50) := 'MM_FORMULARY_AE_VD';
v_table_name6 VARCHAR2(50) := 'MM_MED_INQUIRY_AE_VD';
v_table_name7 VARCHAR2(50) := 'MM_SAMPLETRANS_AE_VD';
v_table_name8 VARCHAR2(50) := 'MM_ADVERSE_EVENT_ALL';
v_table_name9 VARCHAR2(50) := 'MM_USER_COUNTRY_AE_VD';
v_table_name10 VARCHAR2(50) := 'CFG_AE_CONCAT_KEYWORD';
v_table_name VARCHAR2(50) := NULL;
/* source_name is the view or source table */
v_source_name VARCHAR2(50) := 'DA_RDW_AP_DWH';
/* Variables specific to application. */
** Declare Exceptions *
procedure_err EXCEPTION;
** Begin procedure *
BEGIN /* procedure*/
DBMS_OUTPUT.ENABLE(1000000);
** Truncate tables *
BEGIN /* Truncate target*/
v_current_process := 'Truncate table ' || v_table_name1;
DBMS_OUTPUT.PUT_LINE(v_current_process);
EXECUTE IMMEDIATE ('Truncate table ' || v_table_name1);
DBMS_OUTPUT.PUT_LINE (v_table_name1||' truncated' );
EXECUTE IMMEDIATE ('Truncate table ' || v_table_name2);
DBMS_OUTPUT.PUT_LINE (v_table_name2||' truncated' );
EXECUTE IMMEDIATE ('Truncate table ' || v_table_name3);
DBMS_OUTPUT.PUT_LINE (v_table_name3||' truncated' );
EXECUTE IMMEDIATE ('Truncate table ' || v_table_name4);
DBMS_OUTPUT.PUT_LINE (v_table_name4||' truncated' );
EXECUTE IMMEDIATE ('Truncate table ' || v_table_name5);
DBMS_OUTPUT.PUT_LINE (v_table_name5||' truncated' );
EXECUTE IMMEDIATE ('Truncate table ' || v_table_name6);
DBMS_OUTPUT.PUT_LINE (v_table_name6||' truncated' );
EXECUTE IMMEDIATE ('Truncate table ' || v_table_name7);
DBMS_OUTPUT.PUT_LINE (v_table_name7||' truncated' );
EXECUTE IMMEDIATE ('Truncate table ' || v_table_name8);
DBMS_OUTPUT.PUT_LINE (v_table_name8||' truncated' );
EXECUTE IMMEDIATE ('Truncate table ' || v_table_name9);
DBMS_OUTPUT.PUT_LINE (v_table_name9||' truncated' );
EXECUTE IMMEDIATE ('Truncate table ' || v_table_name10);
DBMS_OUTPUT.PUT_LINE (v_table_name10||' truncated' );
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END; /* Truncate target*/
** 1.Load table MM_USER_AE_VD *
BEGIN
insert into DM_RDW_AP_VD.MM_USER_AE_VD
( ID ,
NAME ,
COUNTRY_CODE_BI__C ,
LASTMODIFIEDDATE ,
SYSTEMMODSTAMP )
select
ID ,
NAME ,
COUNTRY_CODE_BI__C ,
LASTMODIFIEDDATE ,
sysdate
from DA_RDW_AP.DM_USER_AE_VD
union
select '999', 'Do not delete this record', null, sysdate-1, sysdate-1
from dual;
DBMS_OUTPUT.PUT_LINE (v_table_name1||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
** 2. SCAN/Load table MF_CALL_AE_VD *
BEGIN
insert into DM_RDW_AP_VD.MF_CALL_AE_VD
( ID ,
NAME ,
CALL_DATE_VOD__C ,
PRE_CALL_NOTES_VOD__C ,
NEXT_CALL_NOTES_VOD__C ,
NEXT_CALL_NOTES_VOD__C_HTML,
COUNTRY_CODE_BI__C ,
OWNERID ,
LASTMODIFIEDDATE ,
SYSTEMMODSTAMP)
select
distinct a.ID ,
a.NAME ,
a.CALL_DATE_VOD__C ,
a.PRE_CALL_NOTES_VOD__C ,
a.NEXT_CALL_NOTES_VOD__C ,
replace(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10),' '),
substr(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10),' '), instr(replace(replace(lower(a.NEXT_CALL_NOTES_VOD__C), chr(10),' '), chr(13), ''), lower( trim(b.Keyword)), 1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10),' '), instr(replace(replace(lower(a.NEXT_CALL_NOTES_VOD__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as NEXT_CALL_NOTES_VOD__C_HTML,
a.COUNTRY_CODE_BI__C ,
a.OWNERID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (da_rdw_ap.df_call_ae_vd a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.OWNERID=c.ID), dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b
--where (b.country_code = 'EN' and instr( lower(a.NEXT_CALL_NOTES_VOD__C), lower(b.Keyword) , 1, 1 ) > 0)
where (b.country_code = 'EN' and instr( lower(' ' || translate(trim(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1 ) > 0) and a.NEXT_CALL_NOTES_VOD__C is not null
union
select
distinct a.ID ,
a.NAME ,
a.CALL_DATE_VOD__C ,
a.PRE_CALL_NOTES_VOD__C ,
a.NEXT_CALL_NOTES_VOD__C ,
replace(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10),' '),
substr(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10),' '), instr(replace(replace(lower(a.NEXT_CALL_NOTES_VOD__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10),' '), instr(replace(replace(lower(a.NEXT_CALL_NOTES_VOD__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as NEXT_CALL_NOTES_VOD__C_HTML,
a.COUNTRY_CODE_BI__C ,
a.OWNERID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (da_rdw_ap.df_call_ae_vd a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.OWNERID=c.ID LEFT OUTER JOIN
dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b on b.country_code = c.COUNTRY_CODE_BI__C)
--where (instr( lower(a.NEXT_CALL_NOTES_VOD__C), lower(b.Keyword) , 1, 1 ) > 0 );
where (instr( lower(' ' || translate(trim(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1 ) > 0) and b.Keyword is not null;
DBMS_OUTPUT.PUT_LINE (v_table_name2||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
** 3. SCAN/Load table MM_CHANGE_REQUEST_AE_VD *
BEGIN
insert into DM_RDW_AP_VD.MM_CHANGE_REQUEST_AE_VD
( ID ,
NAME ,
COMMENTS_BI__C ,
COMMENTS_BI__C_HTML ,
COUNTRY_CODE_BI__C ,
OWNERID ,
LASTMODIFIEDDATE ,
SYSTEMMODSTAMP )
select
distinct a.ID ,
a.NAME ,
a.COMMENTS_BI__C ,
replace(replace(a.COMMENTS_BI__C, chr(10),' '),
substr(replace(a.COMMENTS_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMMENTS_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.COMMENTS_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMMENTS_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as COMMENTS_BI__C_HTML,
a.COUNTRY_CODE_BI__C ,
a.OWNERID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (DA_RDW_AP.DM_CHANGE_REQUEST_AE_VD a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.OWNERID=c.ID), dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b
--where (b.country_code = 'EN' and instr( lower(a.COMMENTS_BI__C), lower(b.Keyword) , 1, 1 ) > 0) and a.COMMENTS_BI__C is not null
where (b.country_code = 'EN' and instr( lower(' ' || translate(trim(replace(a.COMMENTS_BI__C, chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1 ) > 0) and a.COMMENTS_BI__C is not null
union
select
distinct a.ID ,
a.NAME ,
a.COMMENTS_BI__C ,
replace(replace(a.COMMENTS_BI__C, chr(10),' '),
substr(replace(a.COMMENTS_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMMENTS_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.COMMENTS_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMMENTS_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as COMMENTS_BI__C_HTML,
a.COUNTRY_CODE_BI__C ,
a.OWNERID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (DA_RDW_AP.DM_CHANGE_REQUEST_AE_VD a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.OWNERID=c.ID LEFT OUTER JOIN
dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b on b.country_code = c.COUNTRY_CODE_BI__C)
--where instr( lower(a.COMMENTS_BI__C), lower(b.Keyword) , 1, 1 ) > 0 and a.COMMENTS_BI__C is not null;
where (instr( lower(' ' || translate(trim(replace(a.COMMENTS_BI__C, chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1 ) > 0) and b.Keyword is not null;
DBMS_OUTPUT.PUT_LINE (v_table_name3||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
** 4. SCAN/Load table MM_COMPETITOR_INSIGHT_AE_VD *
BEGIN
insert into DM_RDW_AP_VD.MM_COMPETITOR_INSIGHT_AE_VD
( COMPETITOR_INSIGHTS_BI__C ,
COMPETITOR_INSIGHTS_BI__C_HTML,
ID ,
NAME ,
OWNERID ,
LASTMODIFIEDDATE ,
SYSTEMMODSTAMP )
select
distinct a.COMPETITOR_INSIGHTS_BI__C ,
replace(replace(a.COMPETITOR_INSIGHTS_BI__C, chr(10),' '),
substr(replace(a.COMPETITOR_INSIGHTS_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMPETITOR_INSIGHTS_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.COMPETITOR_INSIGHTS_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMPETITOR_INSIGHTS_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as COMPETITOR_INSIGHTS_BI__C_HTML,
a.ID ,
a.NAME ,
a.OWNERID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (DA_RDW_AP.DM_COMPETITOR_INSIGHT_AE_VD a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.OWNERID=c.ID), dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b
--where (b.country_code = 'EN' and instr( lower(a.COMPETITOR_INSIGHTS_BI__C), lower(b.Keyword) , 1, 1 ) > 0) and a.COMPETITOR_INSIGHTS_BI__C is not null
where (b.country_code = 'EN' and instr( lower(' ' || translate(trim(replace(a.COMPETITOR_INSIGHTS_BI__C, chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1 ) > 0 ) and a.COMPETITOR_INSIGHTS_BI__C is not null
union
select
distinct a.COMPETITOR_INSIGHTS_BI__C ,
replace(replace(a.COMPETITOR_INSIGHTS_BI__C, chr(10),' '),
substr(replace(a.COMPETITOR_INSIGHTS_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMPETITOR_INSIGHTS_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.COMPETITOR_INSIGHTS_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMPETITOR_INSIGHTS_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as COMPETITOR_INSIGHTS_BI__C_HTML,
a.ID ,
a.NAME ,
a.OWNERID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (DA_RDW_AP.DM_COMPETITOR_INSIGHT_AE_VD a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.OWNERID=c.ID LEFT OUTER JOIN
dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b on b.country_code = c.COUNTRY_CODE_BI__C)
--where instr( lower(a.COMPETITOR_INSIGHTS_BI__C), lower(b.Keyword) , 1, 1 ) > 0 and a.COMPETITOR_INSIGHTS_BI__C is not null;
where (instr( lower(' ' || translate(trim(replace(a.COMPETITOR_INSIGHTS_BI__C, chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1 ) > 0) and b.Keyword is not null;
DBMS_OUTPUT.PUT_LINE (v_table_name4||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
** 5. SCAN/Load table MM_FORMULARY_AE_VD *
BEGIN
insert into DM_RDW_AP_VD.MM_FORMULARY_AE_VD
( COMMENT_FORMULARY_BI__C ,
COMMENT_FORMULARY_BI__C_HTML,
ID ,
NAME ,
OWNERID ,
LASTMODIFIEDDATE ,
SYSTEMMODSTAMP )
select
distinct a. COMMENT_FORMULARY_BI__C,
replace(replace(a.COMMENT_FORMULARY_BI__C, chr(10),' '),
substr(replace(a.COMMENT_FORMULARY_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMMENT_FORMULARY_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.COMMENT_FORMULARY_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMMENT_FORMULARY_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as COMMENT_FORMULARY_BI__C_HTML,
a.ID ,
a.NAME ,
a.OWNERID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (DA_RDW_AP.DM_FORMULARY_AE_VD a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.OWNERID=c.ID), dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b
-- where (b.country_code = 'EN' and instr( lower(a.COMMENT_FORMULARY_BI__C), lower(b.Keyword) , 1, 1 ) > 0 and a.COMMENT_FORMULARY_BI__C is not null)
where (b.country_code = 'EN' and instr( lower(' ' || translate(trim(replace(a.COMMENT_FORMULARY_BI__C , chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1 ) > 0) and a.COMMENT_FORMULARY_BI__C is not null
union
select
distinct a. COMMENT_FORMULARY_BI__C,
replace(replace(a.COMMENT_FORMULARY_BI__C, chr(10),' '),
substr(replace(a.COMMENT_FORMULARY_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMMENT_FORMULARY_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.COMMENT_FORMULARY_BI__C, chr(10),' '), instr(replace(replace(lower(a.COMMENT_FORMULARY_BI__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as COMMENT_FORMULARY_BI__C_HTML,
a.ID ,
a.NAME ,
a.OWNERID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (DA_RDW_AP.DM_FORMULARY_AE_VD a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.OWNERID=c.ID LEFT OUTER JOIN
dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b on b.country_code = c.COUNTRY_CODE_BI__C)
--where (instr( lower(a.COMMENT_FORMULARY_BI__C), lower(b.Keyword) , 1, 1 ) > 0 and a.COMMENT_FORMULARY_BI__C is not null);
where (instr( lower(' ' || translate(trim(replace(a.COMMENT_FORMULARY_BI__C, chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1) > 0) and b.Keyword is not null;
DBMS_OUTPUT.PUT_LINE (v_table_name5||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
** 6. SCAN/Load table MM_MED_INQUIRY_AE_VD *
BEGIN
insert into DM_RDW_AP_VD.MM_MED_INQUIRY_AE_VD
( ID ,
NAME ,
INQUIRY_TEXT__C ,
INQUIRY_TEXT__C_HTML,
CREATEDBYID ,
LASTMODIFIEDDATE ,
SYSTEMMODSTAMP )
select
distinct a.ID ,
a.NAME ,
a.INQUIRY_TEXT__C ,
replace(replace(a.INQUIRY_TEXT__C, chr(10),' '),
substr(replace(a.INQUIRY_TEXT__C, chr(10),' '), instr(replace(replace(lower(a.INQUIRY_TEXT__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)),1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.INQUIRY_TEXT__C, chr(10),' '), instr(replace(replace(lower(a.INQUIRY_TEXT__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as INQUIRY_TEXT__C_HTML,
a.CREATEDBYID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (DA_RDW_AP.DM_MED_INQUIRY_AE_VD a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.CREATEDBYID=c.ID), dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b
--where (b.country_code = 'EN' and instr( lower(a.INQUIRY_TEXT__C), lower(b.Keyword) , 1, 1 ) > 0 and a.INQUIRY_TEXT__C is not null)
where (b.country_code = 'EN' and instr( lower(' ' || translate(trim(replace(a.INQUIRY_TEXT__C, chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1 ) > 0) and a.INQUIRY_TEXT__C is not null
union
select
distinct a.ID ,
a.NAME ,
a.INQUIRY_TEXT__C ,
replace(replace(a.INQUIRY_TEXT__C, chr(10),' '),
substr(replace(a.INQUIRY_TEXT__C, chr(10),' '), instr(replace(replace(lower(a.INQUIRY_TEXT__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)),1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.INQUIRY_TEXT__C, chr(10),' '), instr(replace(replace(lower(a.INQUIRY_TEXT__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as INQUIRY_TEXT__C_HTML,
a.CREATEDBYID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (DA_RDW_AP.DM_MED_INQUIRY_AE_VD a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.CREATEDBYID=c.ID LEFT OUTER JOIN
dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b on b.country_code = c.COUNTRY_CODE_BI__C)
--where (instr( lower(a.INQUIRY_TEXT__C), lower(b.Keyword) , 1, 1 ) > 0 and a.INQUIRY_TEXT__C is not null);
where (instr( lower(' ' || translate(trim(replace(a.INQUIRY_TEXT__C, chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1 ) > 0) and b.Keyword is not null;
DBMS_OUTPUT.PUT_LINE (v_table_name6||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
** 7. SCAN/Load table MM_SAMPLETRANS_AE_VD *
BEGIN
insert into DM_RDW_AP_VD.MM_SAMPLETRANS_AE_VD
( COMMENTS_VOD__C ,
COMMENTS_VOD__C_HTML,
ID ,
NAME ,
CREATEDBYID ,
LASTMODIFIEDDATE ,
SYSTEMMODSTAMP)
select
distinct a.COMMENTS_VOD__C ,
replace(replace(a.COMMENTS_VOD__C, chr(10),' '),
substr(replace(a.COMMENTS_VOD__C, chr(10),' '), instr(replace(replace(lower(a.COMMENTS_VOD__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.COMMENTS_VOD__C, chr(10),' '), instr(replace(replace(lower(a.COMMENTS_VOD__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as COMMENTS_VOD__C_HTML,
a.ID ,
a.NAME ,
a.CREATEDBYID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (DA_RDW_AP.DM_SAMPLETRANS_AE_VD a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.CREATEDBYID=c.ID), dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b
--where (b.country_code = 'EN' and instr( lower(a.COMMENTS_VOD__C), lower(b.Keyword) , 1, 1 ) > 0 and a.COMMENTS_VOD__C is not null)
where (b.country_code = 'EN' and instr( lower(' ' || translate(trim(replace(a.COMMENTS_VOD__C , chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1 ) > 0) and a.COMMENTS_VOD__C is not null
union
select
a.COMMENTS_VOD__C ,
replace(replace(a.COMMENTS_VOD__C, chr(10),' '),
substr(replace(a.COMMENTS_VOD__C, chr(10),' '), instr(replace(replace(lower(a.COMMENTS_VOD__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' || substr(replace(a.COMMENTS_VOD__C, chr(10),' '), instr(replace(replace(lower(a.COMMENTS_VOD__C), chr(10),' '), chr(13), ''), lower(trim(b.Keyword)), 1,1), length(trim(b.Keyword))) || '</b></FONT>'
) as COMMENTS_VOD__C_HTML,
a.ID ,
a.NAME ,
a.CREATEDBYID ,
a.LASTMODIFIEDDATE ,
a.SYSTEMMODSTAMP
from (DA_RDW_AP.DM_SAMPLETRANS_AE_VD a LEFT OUTER JOIN dm_rdw_ap_vd.mm_user_ae_vd c on a.CREATEDBYID=c.ID LEFT OUTER JOIN
dm_rdw_ap_vd.CFG_ADVERSE_KEYWORD b on b.country_code = c.COUNTRY_CODE_BI__C)
--where instr( lower(a.COMMENTS_VOD__C), lower(b.Keyword) , 1, 1 ) > 0 and a.COMMENTS_VOD__C is not null;
where (instr( lower(' ' || translate(trim(replace(a.COMMENTS_VOD__C, chr(10),' ')), '().,:;?!', ' ') || ' '), lower(' ' || trim(b.Keyword) || ' ') , 1, 1) > 0) and b.Keyword is not null;
DBMS_OUTPUT.PUT_LINE (v_table_name7||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
** 8.Load table MM_ADVERSE_EVENT_ALL *
BEGIN
insert into MM_ADVERSE_EVENT_ALL
( COUNTRY_CODE_BI__C ,
CALLDATE ,
COMMENTS ,
COMMENTS_HTML ,
OWNERID ,
LASTMODIFIEDDATE ,
RECORDTYPE ,
SORT ,
SYSTEMMODSTAMP )
select nvl(a.country_code_bi__c, b.country_code_bi__c) as country_code_bi__c,
a.calldate,
a.comments,
a.comments_html,
a.ownerid,
a.lastmodifieddate,
a.recordtype,
a.sort,
a.systemmodstamp
from (select
country_code_bi__c,
call_date_vod__c as calldate,
next_call_notes_vod__c as comments,
next_call_notes_vod__c_html as comments_html,
ownerid,
lastmodifieddate,
'Call' as recordtype,
'1' as sort,
systemmodstamp
from mf_call_ae_vd
union
select
country_code_bi__c,
lastmodifieddate as calldate,
comments_bi__c as comments,
comments_bi__c_html as comments_html,
ownerid,
lastmodifieddate,
'Change Request' as recordtype,
'2' as sort,
systemmodstamp
from mm_change_request_ae_vd
union
select
null,
lastmodifieddate as calldate,
competitor_insights_bi__c as comments,
competitor_insights_bi__c_html as comments_html,
ownerid,
lastmodifieddate,
'Competitor Insight' as recordtype,
'3' as sort,
systemmodstamp
from mm_competitor_insight_ae_vd
union
select
null,
lastmodifieddate as calldate,
comment_formulary_bi__c as comments,
comment_formulary_bi__c_html as comments_html,
ownerid,
lastmodifieddate,
'Formulary' as recordtype,
'4' as sort,
systemmodstamp
from mm_formulary_ae_vd
union
select
null,
lastmodifieddate as calldate,
inquiry_text__c as comments,
inquiry_text__c_html as comments_html,
createdbyid as ownerid,
lastmodifieddate,
'Customer Request' as recordtype,
'5' as sort,
systemmodstamp
from mm_med_inquiry_ae_vd
union
select
null,
lastmodifieddate as calldate,
comments_vod__c as comments,
comments_vod__c_html as comments_html,
createdbyid as ownerid,
lastmodifieddate,
'Sample Transaction' as recordtype,
'6' as sort,
systemmodstamp
from mm_sampletrans_ae_vd
) a LEFT OUTER JOIN mm_user_ae_vd b on a.ownerid=b.ID;
DBMS_OUTPUT.PUT_LINE (v_table_name8||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
** 9.Load table MM_USER_COUNTRY_AE_VD *
BEGIN
insert into MM_USER_COUNTRY_AE_VD
( REGION ,
COUNTRY_CODE ,
COUNTRY_NAME )
select distinct
case
when u.country_code_bi__c in ('AE','BH','EG','JO','KW','LB','OM','QA','SA') then ('EMEA')
when u.country_code_bi__c in ('AU','CN','HK','ID','IN','JP','KR','MY','PH','SG','TH','TW', 'VN') then ('APAC')
when u.country_code_bi__c in ('BR','CA','MX','US' ) then ('AMERICA')
--when u.country_code_bi__c in ('AU', 'CN','IN','JP','KR','MY', 'TH','TW') then ('APAC')
--when u.country_code_bi__c in ('CA','CE','CR','DO','GT','HN','NI','PA','SV','US') then ('AMERICA')
else (null)
end as REGION,
u.country_code_bi__c AS COUNTRY_CODE,
decode (u.country_code_bi__c,
'AE', 'United Arab Emirates',
'BH', 'Bahrain',
'EG', 'Egypt',
'JO', 'Jordan',
'KW', 'Kuwait',
'LB', 'Lebanon',
'OM', 'Oman',
'QA', 'Qatar',
'SA', 'Saudi Arabia',
'AU', 'Australia',
'CN', 'China',
'HK', 'Hong Kong',
'ID', 'Indonesia',
'IN', 'India',
'JP', 'Japan',
'KR', 'Korea',
'MY', 'Malaysia',
'PH', 'Philippines',
'SG', 'Singapore',
'TH', 'Thailand',
'TW', 'Taiwan',
'VN', 'Vietnam',
'BR', 'Brazil',
'CA', 'Canada',
'MX', 'Mexico',
'US', 'United States') AS COUNTRY_NAME
from DA_RDW_AP.DM_USER_AE_VD u, DA_RDW_AP.DF_CALL_AE_VD c
where u.id = c.ownerid
and u.country_code_bi__c is not null
order by region, country_name;
DBMS_OUTPUT.PUT_LINE (v_table_name9||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
** 10. Load table CFG_AE_CONCAT_KEYWORD - Load concatenated data in a single record by country code *
BEGIN
insert into DM_RDW_AP_VD.CFG_AE_CONCAT_KEYWORD
(COUNTRY_CODE ,
KEYWORD)
select country_code, replace(output, ',', ', ') as keyword
from
(select country_code, wm_concat(trim(keyword)) over (partition by country_code order by rownumber) as output,
count(keyword) over (partition by country_code order by rownumber) as running_count,
count(keyword) over (partition by country_code) as tot_count
from DM_RDW_AP_VD.CFG_ADVERSE_KEYWORD)
where running_count = tot_count;
DBMS_OUTPUT.PUT_LINE (v_table_name10||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
** Mandatory record for burst query *
BEGIN
insert into DM_RDW_AP_VD.MF_CALL_AE_VD
( ID ,
NAME ,
CALL_DATE_VOD__C ,
PRE_CALL_NOTES_VOD__C ,
NEXT_CALL_NOTES_VOD__C ,
NEXT_CALL_NOTES_VOD__C_HTML,
COUNTRY_CODE_BI__C ,
OWNERID ,
LASTMODIFIEDDATE ,
SYSTEMMODSTAMP)
select
ID ,
NAME ,
sysdate - 1 ,
PRE_CALL_NOTES_VOD__C ,
NEXT_CALL_NOTES_VOD__C ,
NEXT_CALL_NOTES_VOD__C_HTML,
COUNTRY_CODE_BI__C ,
OWNERID ,
sysdate - 1 ,
sysdate - 1
from DM_RDW_AP_VD.MF_CALL_AE_VD_DUMMY;
DBMS_OUTPUT.PUT_LINE (v_table_name2||' - '||SQL%ROWCOUNT||' records loaded' );
commit;
EXCEPTION
WHEN OTHERS THEN
v_error_count := v_error_count + 1;
v_error_code := TO_CHAR(sqlcode);
v_error_text := SUBSTR(sqlerrm, 1, 110);
RAISE procedure_err;
END;
END LOAD_DM_AE_DATA_PRC;In following replace.. replace.. substr what are you trying to achieve? Can you please eg. so that we can try to use regular expression to do what being done by so many replace, substrs... This will help improve code performance and readability!
** 2. SCAN/Load table MF_CALL_AE_VD *
replace(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10), ' '),
substr(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10), ' '),
instr(replace(replace(lower(a.NEXT_CALL_NOTES_VOD__C),
chr(10),
chr(13),
lower(trim(b.Keyword)),
1,
1),
length(trim(b.Keyword))),
'<FONT style="BACKGROUND-COLOR: yellow"><b>' ||
substr(replace(a.NEXT_CALL_NOTES_VOD__C, chr(10), ' '),
instr(replace(replace(lower(a.NEXT_CALL_NOTES_VOD__C),
chr(10),
chr(13),
lower(trim(b.Keyword)),
1,
1),
length(trim(b.Keyword))) || '</b></FONT>'
) as NEXT_CALL_NOTES_VOD__C_HTML, -
How to use the default database service name on creating procedure for data
how to use the default database service name on creating procedure for datagaurd client failover ??? all oracle doc says create a new service as below and enable at DB startup. but our client is using/wanted database default service to connect from application on the datagaurd environment (rac to non rac setup).please help.
Db name is = prod.
exec DBMS_SERVICE.CREATE_SERVICE (service_name => 'prod',network_name =>'prod',failover_method => 'BASIC',failover_type => 'SELECT',failover_retries => 180,failover_delay => 1);
says already the service available.
CREATE OR REPLACE TRIGGER manage_dgservice after startup on database DECLARE role
VARCHAR(30);BEGIN SELECT DATABASE_ROLE INTO role FROM V$DATABASE;
IF role = 'NO' THEN DBMS_SERVICE.START_SERVICE('prod');
END IF;
END;
says trigger created, but during a swithover still the service is listeneing on listener.
tns entry.
prod =
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE = YES)
(ADDRESS = (PROTOCOL = TCP)(HOST = prod1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = prod2)(PORT = 1521)) ---> primary db entry
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = proddr)(PORT = 1521)) --> DR DB entry
(CONNECT_DATA =
(SERVICE_NAME = prod)
thanks in advance.
Edited by: 854393 on Dec 29, 2012 11:52 AMHello;
So in the example below replace "ernie" with the alias you want the client to use.
I can show you how I do it :
First an entry need to be added to the client tnsnames.ora that uses a SERVICE_NAME instead of a SID.
ernie =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = Primary.host)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = Standby.host)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ernie)
)Next the service 'ernie' needs to be created manually on the primary database.
BEGIN
DBMS_SERVICE.CREATE_SERVICE('ernie','ernie');
END;
/After creating the service needs to be manually started.
BEGIN
DBMS_SERVICE.START_SERVICE('ernie');
END;
/Several of the default parameters can now be set for 'ernie'.
BEGIN
DBMS_SERVICE.MODIFY_SERVICE
('ernie',
FAILOVER_METHOD => 'BASIC',
FAILOVER_TYPE => 'SELECT',
FAILOVER_RETRIES => 200,
FAILOVER_DELAY => 1);
END;
/Finally a database STARTUP trigger should be created to ensures that this service is only offered if the database is primary.
CREATE TRIGGER CHECK_ERNIE_START AFTER STARTUP ON DATABASE
DECLARE
V_ROLE VARCHAR(30);
BEGIN
SELECT DATABASE_ROLE INTO V_ROLE FROM V$DATABASE;
IF V_ROLE = 'PRIMARY' THEN
DBMS_SERVICE.START_SERVICE('ernie');
ELSE
DBMS_SERVICE.STOP_SERVICE('ernie');
END IF;
END;
/lsnrctl status - should show the new service.
When I do this the Database will still register with the listener. I don't give that to the clients. That one will still be available but nobody knows about it. Meanwhile "ernie" moves with the database role.
So in my example the default just hangs out in the background.
Best Regards
mseberg
Edited by: mseberg on Dec 29, 2012 3:51 PM -
Passing Values to Stored Procedure for "IN" Clause
Hello All:
I am trying to pass values to a stored procedure to use in an IN clause, and getting an "ORA-01722: invalid number".
I believe this has something to do with how .Net handles strings and how I am trying to pass it to my stored procedure.
The values I know need to be IN (2, 1) for the stored procedure to work, and I built a routine that creates a string value to pass in the format "2, 1", but I believe because this value is defined as a string in the .Net code, the leading and trailing apostrophe characters are causing the problem in the stored procedure.
I have in my .Net code the following:
oCommand.Parameters.Add("groupID_", OracleDbType.Varchar2).Value = GroupID;
Where GroupID is defined as a string character, and has values of the following: 2, 1, but due to how .net handles it, it passes as "2, 1".
So of course, inside my stored procedure,
CREATE OR REPLACE PROCEDURE PAYSOL.sp_ProjectsManAppAndFundRpt(
p_Cursor1 OUT SYS_REFCURSOR,
p_Cursor2 OUT SYS_REFCURSOR,
p_Cursor3 OUT SYS_REFCURSOR,
p_Cursor4 OUT SYS_REFCURSOR,
p_Cursor5 OUT SYS_REFCURSOR,
groupID_ IN VARCHAR2)
where I am defining the groupID_ parameter as a VARCHAR2, it is keeping the apostrophes, causing problems when I use it in my IN clause:
AND S.GroupID IN (groupID_)
What do I need to do to pass this value correctly? Is there something I can do inside the stored procedure to strip those characters, or do I need to pass it differently, or completely alter how I am handling this? I don't know the right path to head down, so wanted to seek some help.
Thanks
AndyIN Clauses and parameterized queries can be tricky beasts; so while logically it makes sense to do what you want (it does not do so in databases!)
you can handle this problem in a few ways:
1) anonymous sql (don't recommend)
2) a user defined type and function as such
--see http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:210612357425
--create a table of numbers ,create a function to split the "where" into a table
--then return the data
CREATE OR REPLACE type numberTableType as table of number;
create or replace function in_number( p_string in varchar2 ) return numberTableType AS
l_string long default p_string || ',';
l_data numberTableType := numberTableType();
l_number number ;
N NUMBER;
BEGIN
loop
exit when l_string is null;
n := instr( l_string, ',' );
l_data.extend;
begin --is user inputs a non-numeric value skip the value
l_number := cast(ltrim( rtrim( substr( l_string, 1, n-1 ) ) ) as number);
l_data(l_data.count) := l_number ;
EXCEPTION
WHEN VALUE_ERROR THEN
l_number := 0;
WHEN OTHERS THEN
raise ;
end ;
l_string := substr( l_string, n+1 );
end loop;
RETURN L_DATA;
END in_number;
--then your code
AND S.GroupID IN (select column_value from table(in_number(groupID_))3) actually, just look at this blog posting! it does a better job at this than I am!
http://tkyte.blogspot.com/2006/06/varying-in-lists.html -
Need procedure for the function
Hi
Can any one create a procedure
for the following
Following is a function i need a procedure
which basically Converts the values in the a Column to no of rows
Example : Column Name: USA; Canada; Japan;
in to 3 rows : USA
Canada
Japan
create
or replace function f_get_row_vals(V_column_value VARCHAR2)
return T_LIST_OF_VALS PIPELINED
as
n_str_length NUMBER := 0;
N_START_CHAR NUMBER := 1;
N_END_CHAR NUMBER := 0;
n_counter NUMBER := 1;
v_value VARCHAR2(50) := NULL;
begin
IF V_column_value IS NULL
THEN
RETURN;
END IF;
n_str_length := LENGTH(V_column_value);
LOOP
N_END_CHAR := INSTR(V_column_value,';',1,n_counter);
IF N_END_CHAR = 0
THEN
v_value := SUBSTR(V_column_value, N_START_CHAR, n_str_length - N_START_CHAR + 1);
ELSE
v_value := SUBSTR(V_column_value, N_START_CHAR, N_END_CHAR-N_START_CHAR);
END IF;
n_counter := n_counter + 1;
N_START_CHAR := N_END_CHAR + 1;
pipe row(v_value);
EXIT WHEN N_END_CHAR = 0 ;
END LOOP;
RETURN;
END;
ThanksThis is the procedure they are using previously.
This procedure is calling the above function. I need like this
CREATE
OR REPLACE PROCEDURE P_EXPAND_USER_ACCESS_REV_MART
IS
rec_ODS_USER_ACCESS_REV_MART ODS.ODS_USER_ACCESS_REV_MART%ROWTYPE;
CURSOR c_getrows
IS
select * from ODS.ODS_USER_ACCESS_REV_MART;
BEGIN
OPEN c_getrows;
LOOP
FETCH c_getrows INTO rec_ODS_USER_ACCESS_REV_MART;
EXIT WHEN c_getrows%NOTFOUND;
DBMS_OUTPUT.put_line(rec_ODS_USER_ACCESS_REV_MART.wwfo_area);
DBMS_OUTPUT.put_line(rec_ODS_USER_ACCESS_REV_MART.soln_division);
INSERT INTO DW_USER_ACCESS_REV_MART
user_id,
wwfo_area,
soln_division
SELECT rec_ODS_USER_ACCESS_REV_MART.user_id,
area_tab.column_vaLue,
soln_tab.column_value
FROM TABLE(CAST(f_get_row_vals(rec_ODS_USER_ACCESS_REV_MART.wwfo_area)AS T_LIST_OF_VALS) ) area_tab,
TABLE(CAST(f_get_row_vals(rec_ODS_USER_ACCESS_REV_MART.soln_division)AS T_LIST_OF_VALS)) soln_tab
END LOOP;
CLOSE c_getrows;
COMMIT;
END;
Maybe you are looking for
-
Yoga 3 Pro Brigtness Keeps Resetting
I've been having this problem with my Yoga 3 Pro whereby my screen brightness will reset to a very low value every few minutes, no matter how often I try to change it. Whether or not i change it in the charms menu, in the Power Options menu on the co
-
Hi Experts Material is rejected and we dont have to send it back to the supplier. We decide to scrap it.Wecan scrap the quantity using movement type 555 in MIGO. Can you advise how the debit note will be raised as we are not creating a return po in t
-
hi, Need to bring j2ee application to portal environment. can i bring it in the first hand? if so how can i do it? Regards, Bob
-
SSL connection failures.
Hi, I'm getting some SSL connection failures on our SSL modules, we've reset the stats and noticed we are getting rsa pkcs pad errors when we do a sh ssl-proxy stats ssl. What causes these errors ? SSL error statistics: session alloc fails : 0 sessio
-
Best wireless printer options for my g5
ok, here is my question, I have a non-intel g5. Currently am splitting internet with my neighbor and the router is in his house so I don't have your typical 'network' situation. What I am looking for is a printer that I can print to wirelessly. I was