This script how to ensure two conditions
page number pairs and object style how do you spell
var d = app.activeDocument;
for(i = 0; i < d.pages.length; +2) {
p = d.pages.item(i);
if(p && p.isValid) {
pi = p.pageItems;
for(k = 0; k < pi.length; ++k) {
it = pi[k];
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "(.+?) - (\\d+)";
found = app.activeDocument.findGrep (true);
for (j = 0; j < found.length; j++)
found[j].select();
if(i % 2 == 0)
//if(i % 2 == 0 && found[j].parentTextFrames[0].appliedObjectStyle.name == "AA1")
if(found[j].parentTextFrames[0].appliedObjectStyle.name == "AA1")
found[j].texts[0].select();
//found[j].texts[0].appliedParagraphStyle = "myParaStyle";
app.changeGrepPreferences.changeTo = "$2 / $1";
app.selection[0].changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;
Try this,
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "(.+?) - (\\d+)";
found = app.activeDocument.findGrep (true);
for (j = 0; j < found.length; j++)
found[j].select();
if(found[j].parentTextFrames[0].parentPage.name % 2 == 0 && found[j].parentTextFrames[0].appliedObjectStyle.name == "AA1")
found[j].texts[0].select();
app.changeGrepPreferences.changeTo = "$2 / $1";
app.selection[0].changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;
Vandy
Similar Messages
-
How to combine two conditions : Exists and Item not null ?
Hello !
I have a flash chart region that I would like to display only if two conditions are both true.
The first condition is this one :
Exists (SQL query returns at least one row) :
select 1
from observatoire.fiche aa, observatoire.activite_faite bb
where aa.fiche_id = bb.fiche_id
and bb.fiche_id = aa.fiche_id
AND bb.activites_id = TO_NUMBER(:P23_ACTIVITES_ID)
AND TRUNC(aa.date_activite, 'YYYY') = TRUNC(TO_DATE(:P23_ANNEE, 'YYYY'), 'YYYY')And the second condition would be :
Item not null :
P23_ACTIVITES_IDHow to combine these two conditions into one display condition ?
Thank you .
ChristianHello,
The issue is that you're doing -
TO_NUMBER(:P23_ACTIVITES_ID)When you leave the Null return value blank like that, you'll typically see '%null%' used in session state (i.e. it's not actually null). Obviously '%null%' can't be converted to a number, hence the error you're seeing.
A simple solution would be to make your null return value -1 or some other value that is guaranteed not to be a valid id (and alternative is to convert the %null% to a real null via an App/Page process etc (if you search this forum you'll find a few examples on how to do that). Another alternative is to use a DECODE to detect the '%null%' etc.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! -
How to put two conditions (rendered) in a panelGrid
I have two conditions to renderize a panelGrid, how I declare that? I tried to put two rendered but it didn't work. I tried a lot of things, nothing worked.
Here is one of the codes I tried:
<h:panelGrid styleClass="boxForm" columns="1"
rendered = "#{!DHCPMainBean.newParameterDhcp} "
rendered = "#{DHCPMainBean.newGroup}">Your code throwed the following error:
javax.servlet.ServletException: ServletException in '/network/dhcpMain.jsp': java.lang.String
I tried another forms like this:
<h:panelGrid styleClass="boxForm" columns="1"
rendered= "#{!DHCPMainBean.newParameterDhcp && DHCPMainBean.newGroup} ">throwed this error:
javax.servlet.ServletException: ServletException in '/network/dhcpMain.jsp': /network/dhcpMain.jsp(135,46) The entity name must immediately follow the '&' in the entity reference.
I tried this other:
<h:panelGrid styleClass="boxForm" columns="1"
rendered=
"#{!DHCPMainBean.newParameterDhcp&DHCPMainBean.newGroup;}">But, it didn't work either:
javax.servlet.ServletException: ServletException in '/network/dhcpMain.jsp': /network/dhcpMain.jsp(136,57) The entity "DHCPMainBean.newGroup" was referenced, but not declared. -
How to set two Conditions Simultaneously in set where clause
Hi,
I have a messgechoice item , and i need to fire messagechoice VO with two conditions.
For Eg:-- we have three Items ProjectContractor& Work Order on a custom Page , now i need work order list should populate on lelection of project & contractor both, so i have apply a fire partial event on contractor where i i get the parameter values as follows:--
CO Code
if("OrderNoself".equals(event))
String value21 = (String)pageContext.getParameter("ProjectName");
System.out.println("The Selected Project Name for self Contractor is "+value21);
String value22 = (String)pageContext.getParameter("ContractorName");
System.out.println("The SelectedContractor Name for ContractorName is "+value22);
Serializable [] params11 = {value21,value22} ;
am.invokeMethod("initWorkOrderNumberself",params11);
AM Code
public void initWorkOrderNumberself(String ProjectName,String ContractorName");
getDprWorkOrderpopVO1().setWhereClause("PROJECT_NAME = " + "'"+ProjectName+"'");
getDprWorkOrderpopVO1().setWhereClause("CONTRACTOR_NAME = " + "'"+ContractorName+"'");
getDprWorkOrderpopVO1().executeQuery();
Now when i run my form then Work order list only populateon set conditions ofContractor NAme only.
Please suggest....Hi Tarun,
Thanx for ur reply,
i have used below mwntioned code provided by you but still i m getting error...
public void initWorkOrderNumber(String ProjectName,String ContractorName)
//getDprWorkOrderpopVO1().setWhereClause("CONTRACTOR_NAME = " + "'"+ContractorName+"'");
//getDprWorkOrderpopVO1().executeQuery();
getDprWorkOrderpopVO1().setWhereClause("PROJECT_NAME =:1 AND CONTRACTOR_NAME=:2");
getDprWorkOrderpopVO1().setWhereClauseParams(null);
getDprWorkOrderpopVO1().setWhereClauseParam(1,ProjectName);
getDprWorkOrderpopVO1().setWhereClauseParam(2,ContractorName);
getDprWorkOrderpopVO1().executeQuery();
ERROR:---
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (select * from omaxe_work_order_headers
where work_order_number is not null) QRSLT WHERE (PROJECT_NAME =:1 AND CONTRACTOR_NAME=:2)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:985)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:721)
at omaxe.oracle.apps.xxopa.boqmain.webui.OmaxeDPRCO.processFormRequest(OmaxeDPRCO.java:107)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
at OA.jspService(OA.jsp:40)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
java.sql.SQLException: ORA-01006: bind variable does not exist
Regards
Saurabh -
Sap Script - How to show two logos consecutive in a row.
Hi All,
If in a window I insert two lines:
/: INCLUDE ZHEX-MACRO-ZLOGO001 OBJECT TEXT ID ST
/: INCLUDE ZHEX-MACRO-ZLOGO002 OBJECT TEXT ID ST
the Sap Script shows two logos not consecutive in a row.
I'd like to show the two logos in the same row and if it is possible, separated by blanks.
Any idea?
Thanks in advance for your kind support.
Regards,
GiovanniThis is because of your page size limitation. IF you will create two windows then it will work.Aline these windows properly in layout of page.
-
How to put Two condition at once
Dear all
I am combining two file here for the calculation, but the proble is that i have given a condition when colulm 4 of file-1 and column -2 of file are same then make calculation,,
But i want put a condition when column 4 of file -1 is identical with column 2 of file-2, and column 3 of file-1 is identical with colum -3 of file2 then make calculation,
here i ahve attache my programme and files
Thanks and regards
Prince
Attachments:
test fiel-1.txt 99 KB
test-2.txt 2 KB
test.vi 29 KBSimply use an "AND" node:
Regards,
Even
Certified LabVIEW Associate Developer
Automated Test Developer
Topro AS
Norway -
How to apply two conditions in Suppress in Section Expert
Hi,
I need your help in applying to conditions in the Details section for the suppress in the Section Expert. My Report looks like:
Details A: {@SUM -DR} {@SUM -CR} {@SUM -Balance} {@TT-CLASS}
Details B: {Deal_No} {Image_No} {Amount} {@Comments}
Currently, I am applying a condition to suppress both Details A and Details B in the section expert:
{@TT-CLASS}="OB"
Now while running the report, I got some duplicated deals ex:
123 1 1000 Reversal
123 1 1000 Reversal
124 2 2000 Approved
So I applied a condition in the section expert for the details A and B which is:
({Deal_No} = next({Deal_No} ) and {Image_No} =next( {Image_No} ) )
or
{@TT-CLASS}="OB"
And it is still giving me the duplicated deals when I am running the report. So can you please help.
ThanksDuplicates are usually caused by an incorrect Join.
What is the datasource of the report - tables/views, stored procedures, sql query?
If you're reporting against tables/views, see if checking the 'select distinct records' option under the 'Database' menu helps.
-Abhilash -
How to check two conditions while loading to target
Hi All,
I am New to ODI could you please help me in solving this issue.
Actually I scenario is
I am loading from DB2/As400 to oracle
I have so many itemsno's in source table, and I have to check
if count(itemno)>1 and uom='CS' then UOM_flag = 'N' else 'Y'Hi,
Welcome to ODI world! lol
At the column UOM_flag mapping use a "case when" structure (I'm assuming you Work/Stage area is at Oracle)
I believe will be something like:
Case when count(itemno) > 1 then 'N'
else 'Y'
end
ODI will define, automatically, all necessary columns as group by expression...
Does it help you?
Message was edited by:
Cezar_Santos -
How to compare two files in java & uncommon text should print in text file.
Hi,
Can any one help me to write Core java program for this.
How to compare two files in java & uncommon text should print in other text file.
thanks
SamHi All,
i m comparing two HTML file.. thats why i am getting problem..
import java.io.BufferedReader;
import java.io.FileReader;
public class textmatch{
public static void main(String[] argv)
throws Exception{
BufferedReader fh =new BufferedReader(new FileReader("internal.html"),1024);
BufferedReader sh = new BufferedReader(new FileReader("external.html"),1024);
String s;
String y;
while ((s=fh.readLine())!=null)
if ( s.equals(y=sh.readLine()) ){
System.out.println(s + " " + y); //REMOVE THIS PRINTLN STATEMENT IF YOU JUST WANT TO SHOW THE SIMILARITIES
sh.close();
fh.close(); }
thanks
Sam -
Hi everyone,
I need to add rounding to this script. I need two versions, one for 1 decimal place and one for 0 decimal places. Can anyone help out?
#target illustrator
addMeasurements();
function addMeasurements() {
var i, doc, imp, met, txtItems, txt, nub;
doc = app.activeDocument;
imp = doc.layers.getByName( 'Text' );
met = doc.layers.add(); met.name = 'New';
txtItems = imp.textFrames;
for ( i = 0; i < txtItems.length; i++ ) {
txtItems[i].duplicate( met, ElementPlacement.PLACEATEND )
txtItems = met.textFrames;
for ( i = 0; i < txtItems.length; i++ ) {
var nub = parseInt( txt = txtItems[i].contents ); // For Numbers only!!!!
txtItems[i].contents = String( txt * 1.1 )
Thanks in advance.The example is just a basic function… Just place it after the main function body in your script… Call it where you need it… here is an example… I changed your parseInt() to parseFloat() to deal with your decmial values… While this should wolk it still may NOT be what you want… i.e. it does nothing about keeping the alpha characters in your text frames the new numbers replace all content…
#target illustrator
addMeasurements();
function addMeasurements() {
var i, doc, imp, met, txtItems, txt, nub;
doc = app.activeDocument;
imp = doc.layers.getByName( 'Numbers' );
met = doc.layers.add(); met.name = 'New';
txtItems = imp.textFrames;
for ( i = 0; i < txtItems.length; i++ ) {
txtItems[i].duplicate( met, ElementPlacement.PLACEATEND )
txtItems = met.textFrames;
for ( i = 0; i < txtItems.length; i++ ) {
var nub = parseFloat( txtItems[i].contents ); // now parseFloat()
nub = nub * 1.123456; // just to check the function rounds…
var rnub = roundToDP( nub, 2 );
txtItems[i].contents = String( rnub ); // replaces all content…?
function roundToDP( n, dP ) {
return Math.round( n * Math.pow( 10, dP ) ) / Math.pow( 10, dP ); -
How to compare two oracle database schemas
hi all,
i want to compare and find out differences between two oracle databases. The comparison should be made on between table definition,table data,primary and foreign keys, packages and functions.
Is there any management console or tool embedded in the oracle enterprise manger?
it is really appreciate if anyone can point me towards wright direction asap.Hi ,
This script would help u a lot in comparing 2 schemas and generate a report on them.
Script:
This script will compare two Oracle schemas and generate a report of
discrepencies and this script has been used against Oracle 7.3.4, 8.0.5,
REM and 8.1.7 databases, but it should also work with other versions.
REM
REM Please note that the following schema object types and attributes are
REM not compared by this script at this time:
REM
REM cluster definitions
REM comments on tables and columns
REM nesting, partition, IOT, and temporary attributes of tables
REM snapshots/materialized views, logs, and refresh groups
REM foreign function libraries
REM object types
REM operators
REM indextypes
REM dimensions
REM auditing information
REM new schema attributes added for Oracle 9i
REM
REM Version 02-04-2002
REM
PROMPT
PROMPT Schema Comparison
PROMPT =================
PROMPT
PROMPT Run this script while connected to one Oracle schema. Enter the Oracle
PROMPT username, password, and SQL*Net / Net8 service name of a second schema.
PROMPT This script will compare the two schemas and generate a report of
PROMPT differences.
PROMPT
PROMPT A temporary database link and table will be created and dropped by
PROMPT this script.
PROMPT
ACCEPT schema CHAR PROMPT "Enter username for remote schema: "
ACCEPT passwd CHAR PROMPT "Enter password for remote schema: " HIDE
ACCEPT tnssvc CHAR PROMPT "Enter SQL*Net / Net8 service for remote schema: "
PROMPT
ACCEPT report CHAR PROMPT "Enter filename for report output: "
SET FEEDBACK OFF
SET VERIFY OFF
CREATE DATABASE LINK rem_schema CONNECT TO &schema IDENTIFIED BY &passwd
USING '&tnssvc';
SET TRIMSPOOL ON
SPOOL &report
SELECT SUBSTR (RPAD (TO_CHAR (SYSDATE, 'mm/dd/yyyy hh24:mi:ss'), 25), 1, 25)
"REPORT DATE AND TIME"
FROM SYS.dual;
COL local_schema FORMAT a35 TRUNC HEADING "LOCAL SCHEMA"
COL remote_schema FORMAT a35 TRUNC HEADING "REMOTE SCHEMA"
SELECT USER || '@' || C.global_name local_schema,
A.username || '@' || B.global_name remote_schema
FROM user_users@rem_schema A, global_name@rem_schema B, global_name C
WHERE ROWNUM = 1;
SET PAGESIZE 9999
SET LINESIZE 250
SET FEEDBACK 1
SET TERMOUT OFF
PROMPT
REM Object differences
REM ==================
COL object_name FORMAT a30
PROMPT SUMMARY OF OBJECTS MISSING FROM LOCAL SCHEMA
SELECT object_type, COUNT (*)
FROM
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects@rem_schema
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects
GROUP BY object_type
ORDER BY object_type;
PROMPT SUMMARY OF EXTRANEOUS OBJECTS IN LOCAL SCHEMA
SELECT object_type, COUNT (*)
FROM
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects
WHERE object_type != 'DATABASE LINK'
OR object_name NOT LIKE 'REM_SCHEMA.%'
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects@rem_schema
GROUP BY object_type
ORDER BY object_type;
PROMPT OBJECTS MISSING FROM LOCAL SCHEMA
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects@rem_schema
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects
ORDER BY object_type, object_name;
PROMPT EXTRANEOUS OBJECTS IN LOCAL SCHEMA
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects
WHERE object_type != 'DATABASE LINK'
OR object_name NOT LIKE 'REM_SCHEMA.%'
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects@rem_schema
ORDER BY object_type, object_name;
PROMPT OBJECTS IN LOCAL SCHEMA THAT ARE NOT VALID
SELECT object_name, object_type, status
FROM user_objects
WHERE status != 'VALID'
ORDER BY object_name, object_type;
REM Table differences
REM =================
PROMPT TABLE COLUMNS MISSING FROM ONE SCHEMA
PROMPT (NOTE THAT THIS REPORT DOES NOT LIST DISCREPENCIES IN COLUMN ORDER)
SELECT table_name, column_name, 'Local' "MISSING IN SCHEMA"
FROM user_tab_columns@rem_schema
WHERE table_name IN
SELECT table_name
FROM user_tables
MINUS
SELECT table_name, column_name, 'Local' "MISSING IN SCHEMA"
FROM user_tab_columns
UNION ALL
SELECT table_name, column_name, 'Remote' "MISSING IN SCHEMA"
FROM user_tab_columns
WHERE table_name IN
SELECT table_name
FROM user_tables@rem_schema
MINUS
SELECT table_name, column_name, 'Remote' "MISSING IN SCHEMA"
FROM user_tab_columns@rem_schema
ORDER BY 1, 2;
COL schema FORMAT a15
COL nullable FORMAT a8
COL data_type FORMAT a9
COL data_length FORMAT 9999 HEADING LENGTH
COL data_precision FORMAT 9999 HEADING PRECISION
COL data_scale FORMAT 9999 HEADING SCALE
COL default_length FORMAT 9999 HEADING LENGTH_OF_DEFAULT_VALUE
PROMPT DATATYPE DISCREPENCIES FOR TABLE COLUMNS THAT EXIST IN BOTH SCHEMAS
SELECT table_name, column_name, 'Remote' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns@rem_schema
WHERE (table_name, column_name) IN
SELECT table_name, column_name
FROM user_tab_columns
MINUS
SELECT table_name, column_name, 'Remote' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns
UNION ALL
SELECT table_name, column_name, 'Local' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns
WHERE (table_name, column_name) IN
SELECT table_name, column_name
FROM user_tab_columns@rem_schema
MINUS
SELECT table_name, column_name, 'Local' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns@rem_schema
ORDER BY 1, 2, 3;
REM Index differences
REM =================
COL column_position FORMAT 999 HEADING ORDER
PROMPT INDEX DISCREPENCIES FOR INDEXES THAT EXIST IN BOTH SCHEMAS
SELECT A.index_name, 'Remote' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes@rem_schema A, user_ind_columns@rem_schema B
WHERE A.index_name IN
SELECT index_name
FROM user_indexes
AND B.index_name = A.index_name
AND B.table_name = A.table_name
MINUS
SELECT A.index_name, 'Remote' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes A, user_ind_columns B
WHERE B.index_name = A.index_name
AND B.table_name = A.table_name
UNION ALL
SELECT A.index_name, 'Local' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes A, user_ind_columns B
WHERE A.index_name IN
SELECT index_name
FROM user_indexes@rem_schema
AND B.index_name = A.index_name
AND B.table_name = A.table_name
MINUS
SELECT A.index_name, 'Local' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes@rem_schema A, user_ind_columns@rem_schema B
WHERE B.index_name = A.index_name
AND B.table_name = A.table_name
ORDER BY 1, 2, 6;
REM Constraint differences
REM ======================
PROMPT CONSTRAINT DISCREPENCIES FOR TABLES THAT EXIST IN BOTH SCHEMAS
SET FEEDBACK OFF
CREATE TABLE temp_schema_compare
database NUMBER(1),
object_name VARCHAR2(30),
object_text VARCHAR2(2000),
hash_value NUMBER
DECLARE
CURSOR c1 IS
SELECT constraint_name, search_condition
FROM user_constraints
WHERE search_condition IS NOT NULL;
CURSOR c2 IS
SELECT constraint_name, search_condition
FROM user_constraints@rem_schema
WHERE search_condition IS NOT NULL;
v_constraint_name VARCHAR2(30);
v_search_condition VARCHAR2(32767);
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO v_constraint_name, v_search_condition;
EXIT WHEN c1%NOTFOUND;
v_search_condition := SUBSTR (v_search_condition, 1, 2000);
INSERT INTO temp_schema_compare
database, object_name, object_text
VALUES
1, v_constraint_name, v_search_condition
END LOOP;
CLOSE c1;
OPEN c2;
LOOP
FETCH c2 INTO v_constraint_name, v_search_condition;
EXIT WHEN c2%NOTFOUND;
v_search_condition := SUBSTR (v_search_condition, 1, 2000);
INSERT INTO temp_schema_compare
database, object_name, object_text
VALUES
2, v_constraint_name, v_search_condition
END LOOP;
CLOSE c2;
COMMIT;
END;
SET FEEDBACK 1
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Remote' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints@rem_schema A, temp_schema_compare B
WHERE A.table_name IN
SELECT table_name
FROM user_tables
AND B.database (+) = 2
AND B.object_name (+) = A.constraint_name
MINUS
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Remote' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints A, temp_schema_compare B
WHERE B.database (+) = 1
AND B.object_name (+) = A.constraint_name
UNION ALL
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Local' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints A, temp_schema_compare B
WHERE A.table_name IN
SELECT table_name
FROM user_tables@rem_schema
AND B.database (+) = 1
AND B.object_name (+) = A.constraint_name
MINUS
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Local' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints@rem_schema A, temp_schema_compare B
WHERE B.database (+) = 2
AND B.object_name (+) = A.constraint_name
ORDER BY 1, 4, 2;
REM Database link differences
REM =========================
PROMPT DATABASE LINK DISCREPENCIES
COL db_link FORMAT a40
SELECT db_link, 'Remote' schema, username, host
FROM user_db_links@rem_schema
MINUS
SELECT db_link, 'Remote' schema, username, host
FROM user_db_links
UNION ALL
SELECT db_link, 'Local' schema, username, host
FROM user_db_links
WHERE db_link NOT LIKE 'REM_SCHEMA.%'
MINUS
SELECT db_link, 'Local' schema, username, host
FROM user_db_links@rem_schema
ORDER BY 1, 2;
REM Sequence differences
REM ====================
PROMPT SEQUENCE DISCREPENCIES
SELECT sequence_name, 'Remote' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences@rem_schema
MINUS
SELECT sequence_name, 'Remote' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences
UNION ALL
SELECT sequence_name, 'Local' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences
MINUS
SELECT sequence_name, 'Local' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences@rem_schema
ORDER BY 1, 2;
REM Private synonym differences
REM ===========================
PROMPT PRIVATE SYNONYM DISCREPENCIES
SELECT synonym_name, 'Remote' schema, table_owner, table_name, db_link
FROM user_synonyms@rem_schema
MINUS
SELECT synonym_name, 'Remote' schema, table_owner, table_name, db_link
FROM user_synonyms
UNION ALL
SELECT synonym_name, 'Local' schema, table_owner, table_name, db_link
FROM user_synonyms
MINUS
SELECT synonym_name, 'Local' schema, table_owner, table_name, db_link
FROM user_synonyms@rem_schema
ORDER BY 1, 2;
REM PL/SQL differences
REM ==================
PROMPT SOURCE CODE DISCREPENCIES FOR PACKAGES, PROCEDURES, AND FUNCTIONS
PROMPT THAT EXIST IN BOTH SCHEMAS
SELECT name, type, COUNT (*) discrepencies
FROM
SELECT name, type, line, text
FROM user_source@rem_schema
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects
MINUS
SELECT name, type, line, text
FROM user_source
UNION ALL
SELECT name, type, line, text
FROM user_source
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects@rem_schema
MINUS
SELECT name, type, line, text
FROM user_source@rem_schema
GROUP BY name, type
ORDER BY name, type;
PROMPT SOURCE CODE DISCREPENCIES FOR PACKAGES, PROCEDURES, AND FUNCTIONS
PROMPT THAT EXIST IN BOTH SCHEMAS (CASE INSENSITIVE COMPARISON)
SELECT name, type, COUNT (*) discrepencies
FROM
SELECT name, type, line, UPPER (text)
FROM user_source@rem_schema
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects
MINUS
SELECT name, type, line, UPPER (text)
FROM user_source
UNION ALL
SELECT name, type, line, UPPER (text)
FROM user_source
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects@rem_schema
MINUS
SELECT name, type, line, UPPER (text)
FROM user_source@rem_schema
GROUP BY name, type
ORDER BY name, type;
REM Trigger differences
REM ===================
PROMPT TRIGGER DISCREPENCIES
SET FEEDBACK OFF
TRUNCATE TABLE temp_schema_compare;
DECLARE
CURSOR c1 IS
SELECT trigger_name, trigger_body
FROM user_triggers;
CURSOR c2 IS
SELECT trigger_name, trigger_body
FROM user_triggers@rem_schema;
v_trigger_name VARCHAR2(30);
v_trigger_body VARCHAR2(32767);
v_hash_value NUMBER;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO v_trigger_name, v_trigger_body;
EXIT WHEN c1%NOTFOUND;
v_trigger_body := REPLACE (v_trigger_body, ' ', NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(9), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(10), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(13), NULL);
v_trigger_body := UPPER (v_trigger_body);
v_hash_value := dbms_utility.get_hash_value (v_trigger_body, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (1, v_trigger_name, v_hash_value);
END LOOP;
CLOSE c1;
OPEN c2;
LOOP
FETCH c2 INTO v_trigger_name, v_trigger_body;
EXIT WHEN c2%NOTFOUND;
v_trigger_body := REPLACE (v_trigger_body, ' ', NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(9), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(10), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(13), NULL);
v_trigger_body := UPPER (v_trigger_body);
v_hash_value := dbms_utility.get_hash_value (v_trigger_body, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (2, v_trigger_name, v_hash_value);
END LOOP;
CLOSE c2;
END;
SET FEEDBACK 1
SELECT A.trigger_name, 'Local' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 1
AND A.table_name IN
SELECT table_name
FROM user_tables@rem_schema
MINUS
SELECT A.trigger_name, 'Local' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 2
UNION ALL
SELECT A.trigger_name, 'Remote' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 2
AND A.table_name IN
SELECT table_name
FROM user_tables
MINUS
SELECT A.trigger_name, 'Remote' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 1
ORDER BY 1, 2, 5, 3;
REM View differences
REM ================
PROMPT VIEW DISCREPENCIES
SET FEEDBACK OFF
TRUNCATE TABLE temp_schema_compare;
DECLARE
CURSOR c1 IS
SELECT view_name, text
FROM user_views;
CURSOR c2 IS
SELECT view_name, text
FROM user_views@rem_schema;
v_view_name VARCHAR2(30);
v_text VARCHAR2(32767);
v_hash_value NUMBER;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO v_view_name, v_text;
EXIT WHEN c1%NOTFOUND;
v_text := REPLACE (v_text, ' ', NULL);
v_text := REPLACE (v_text, CHR(9), NULL);
v_text := REPLACE (v_text, CHR(10), NULL);
v_text := REPLACE (v_text, CHR(13), NULL);
v_text := UPPER (v_text);
v_hash_value := dbms_utility.get_hash_value (v_text, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (1, v_view_name, v_hash_value);
END LOOP;
CLOSE c1;
OPEN c2;
LOOP
FETCH c2 INTO v_view_name, v_text;
EXIT WHEN c2%NOTFOUND;
v_text := REPLACE (v_text, ' ', NULL);
v_text := REPLACE (v_text, CHR(9), NULL);
v_text := REPLACE (v_text, CHR(10), NULL);
v_text := REPLACE (v_text, CHR(13), NULL);
v_text := UPPER (v_text);
v_hash_value := dbms_utility.get_hash_value (v_text, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (2, v_view_name, v_hash_value);
END LOOP;
CLOSE c2;
END;
SET FEEDBACK 1
SELECT A.view_name, 'Local' schema, B.hash_value
FROM user_views A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 1
AND A.view_name IN
SELECT view_name
FROM user_views@rem_schema
MINUS
SELECT A.view_name, 'Local' schema, B.hash_value
FROM user_views@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 2
UNION ALL
SELECT A.view_name, 'Remote' schema, B.hash_value
FROM user_views@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 2
AND A.view_name IN
SELECT view_name
FROM user_views
MINUS
SELECT A.view_name, 'Remote' schema, B.hash_value
FROM user_views A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 1
ORDER BY 1, 2;
REM Job queue differences
REM =====================
COL what FORMAT a30
COL interval FORMAT a30
PROMPT JOB QUEUE DISCREPENCIES
SELECT what, interval, 'Remote' schema
FROM user_jobs@rem_schema
MINUS
SELECT what, interval, 'Remote' schema
FROM user_jobs
UNION ALL
SELECT what, interval, 'Local' schema
FROM user_jobs
MINUS
SELECT what, interval, 'Local' schema
FROM user_jobs@rem_schema
ORDER BY 1, 2, 3;
REM Privilege differences
REM =====================
PROMPT OBJECT-LEVEL GRANT DISCREPENCIES
SELECT owner, table_name, 'Remote' schema, grantee, privilege, grantable
FROM user_tab_privs@rem_schema
WHERE (owner, table_name) IN
SELECT owner, object_name
FROM all_objects
MINUS
SELECT owner, table_name, 'Remote' schema, grantee, privilege, grantable
FROM user_tab_privs
UNION ALL
SELECT owner, table_name, 'Local' schema, grantee, privilege, grantable
FROM user_tab_privs
WHERE (owner, table_name) IN
SELECT owner, object_name
FROM all_objects@rem_schema
MINUS
SELECT owner, table_name, 'Local' schema, grantee, privilege, grantable
FROM user_tab_privs@rem_schema
ORDER BY 1, 2, 3;
PROMPT SYSTEM PRIVILEGE DISCREPENCIES
SELECT privilege, 'Remote' schema, admin_option
FROM user_sys_privs@rem_schema
MINUS
SELECT privilege, 'Remote' schema, admin_option
FROM user_sys_privs
UNION ALL
SELECT privilege, 'Local' schema, admin_option
FROM user_sys_privs
MINUS
SELECT privilege, 'Local' schema, admin_option
FROM user_sys_privs@rem_schema
ORDER BY 1, 2;
PROMPT ROLE PRIVILEGE DISCREPENCIES
SELECT granted_role, 'Remote' schema, admin_option, default_role, os_granted
FROM user_role_privs@rem_schema
MINUS
SELECT granted_role, 'Remote' schema, admin_option, default_role, os_granted
FROM user_role_privs
UNION ALL
SELECT granted_role, 'Local' schema, admin_option, default_role, os_granted
FROM user_role_privs
MINUS
SELECT granted_role, 'Local' schema, admin_option, default_role, os_granted
FROM user_role_privs@rem_schema
ORDER BY 1, 2;
SPOOL OFF
SET TERMOUT ON
PROMPT
PROMPT Report output written to &report
SET FEEDBACK OFF
DROP TABLE temp_schema_compare;
DROP DATABASE LINK rem_schema;
SET FEEDBACK 6
SET PAGESIZE 20
SET LINESIZE 80 -
How to set the condition for dynamic Xquery in OSB11g
Hi to all,
I have a requirement like three different requests all are converted in to standard format.For this scenario I use dyamic X-query transformation.For Example RequestA,RequestB and RequesrC what ever request it should be converted into one standard format say Response.For this I create three X-Query transformations,and proxy service.If i get the request from RequestA related XQuery will execute (RequstA to Response transformation).
RequestA------Response
RequestB------Response
RequestC------Response
Actually my idea is based on requset schema name (like RequestA) it will convert,for this scenario how can I set condition in dynamicXquery.
Thanks in advance.Hi,
Can u plz tel how make the x-query for an XML file,basically i follow the below link
http://beatechnologies.wordpress.com/2010/12/01/dynamic-xquery-in-oracle-service-bus/
In this example I'm creating the routing rulesXML file in Eclipse,I'm unable to assigning this xml file to an variable.I create a Xquery for this XML with any type,And I create GetRouting.XQ.can u pls tel which is correct method to Xquery with any type for this XML or else i send my jar file,tell me any modifications are required.
Thanks in advance -
How to join two similar layers together?
Hey all! Please help me out, It is a little thing to do, but I am really stocked at this. How to join two layers together?? For example two Text layers or anything. Pleas can you describe the way to do it and write (if it exist) the shortcut for it?
Now I know, that layers in AAF can't be joined, there is just a "Pre-Compose". But this function is disabled the FX colone, and I have to have it there.
In this tut http://www.videocopilot.net/tutorials/shatterize/ he joined two text layers. But with some shortcut so I don't know, how he did it.
Can anyone help me plz?
THX for replyLufty09 wrote:
Yes, but this is disabled the Fx button :/
Now you need to look up precomposing in the help system. It's all explained there.
Nesting and precomping are advanced functions and require careful planning or inspired improvisation within the limits of the software. You also need to look up how the rasterization button works in its two operation modes.
bogiesan -
i'm using numbers for my students grades. the passing grade is 30 points. what i want to happen is that very students with a grade of less than 30 will have their points it red color. does the IF function can do this? how?
Hi efren
Conditional format will do this.
Select the Cells, then Menu > Format > Show Conditional Format Rules
Regards,
Ian. -
A login webpage gives the message "This script requires that jquery.js be loaded first." then will not show the user ID and password login boxes. How can this be corrected?
That message is listed in two scripts on the bank's site. One function that can display the message is named PhotoRotator and the other is named PromoRotator. However, I can't seem to trigger the error myself.
If you have any add-ons that alter the page, such as ad blockers, try creating an exception for these sites and see whether that helps:
www.northrim.com<br>
www.northrimbankonline.com
You also could try this logon page: https://www.northrimbankonline.com/onlineserv/HB/Signon.cgi
(''Obviously you should be cautious about links offered on public forums to ensure you are not being phished! Check them out carefully before entering your username and password.'')
Maybe you are looking for
-
To get Footer Displayed for Dunning Letter Report
Hi All There is a requirement to Add footer to display at bottom of page in Oracle reports with Customer Number, And Sum of Transaction Amount for Dunning Letter. Would need some hint towards fixing this Can we get this requirement using Dunning Lett
-
Just a week ago, I upgraded from the latest upgrade of Snow Leopard to Mavericks 10.9.2, due to the news about security concerns on all Apple computers and IOS devices. I did this upgrade at an Apple store under the guidance of a "genius". The initia
-
Step by step text box appeared on desk top
I have this box that appeared on my desktop - it is a rectangular shape but with rounded corners. It is a black screen with with text and a white frame. It types out exactly what I am doing on my computer - for example just them it typed out "compute
-
I have 1700 photos exactly in my iPhoto, but when I sync, it says that it's copying 1765. The Photos app says 1700, but the settings app says 1700. I deleted them all from the phone, and it said 0 photos in all places like normal. But when I synced a
-
When building an AIR app for iOS, inside of the (app.xml) file there is a section for <iPhone> Inside the iPhone section is a <requestedDisplayResolution> I understand what this feature does and I am able to use it correctly... but my question is...