How to use Concatenation option in Foreign Key
Hi,
I have 2 tables.
Master Table : Father(a varchar2(10),b varchar2(10)
Child Table : Child (c varcahr2(20))
In the child Table i have stored the following Father.A||Father.B
Child.C = Father.a + Father.B
I want to create a Foreign Key Relation for this.
I cant use '||' option.
Can any one please guide me.
ALTER TABLE child ADD CONSTRAINT fk_child FOREIGN KEY (c) REFERENCES father(a||b)
ON DELETE CASCADE;
This statement throws error.
Pls help me in this
Why not create a third column on the Master table ?
alter table Father add c varchar2(20);
-- then perform an update
update Father set c := a|| b
commit
/and then create the constraint as;
ALTER TABLE child ADD CONSTRAINT fk_child FOREIGN KEY (c) REFERENCES father (c) ON DELETE CASCADE;
Similar Messages
-
Hi, I'm Hannah. I'm using a Mac. Can you show me how to use the options with F10, F11, F12 for turning the sound up, or down or mute? Thank you very much
Normally simply pressing them should do what you want, F10 to mute; F11 to decrease volume; F12 to increase volume. However, it's possible that you have a box ticked in Keyboard preferences which modifies the behaviour of the keys, requiring you to also hold down the Fn key (bottom left key on the keyboard) to enable the function.
Check System Preferences>Keyboard to makes sure the box indicated in the image isn't ticked. -
How will use Select-Options in Read table Concept.
Hi All,
How will use Select-Options in Read table. For example,
Select-Options : test for bseg-prctr.
Select * from bseg into table ITAB.
Read table ITAB with key prctr in test.
Last line is showing error. If any way to read ITAB as conditions given per select options.
Thankx Advance,,,HI,
you cannot use " IN " with read statement , read statement is used as:
READ TABLE it_collect ASSIGNING <fs_collect>
WITH KEY rbpl = <fs_wkdet>-arbpl
ufnr = <fs_wkdet>-aufnr.
anyways you can use loop at statement before read to use " into " statement as:
LOOP AT it_master INTO l_master
WHERE werks = l_werks
hope it will help you
regards
rahul
Edited by: RAHUL SHARMA on Dec 30, 2008 9:14 AM -
OSB11g - using Concatenation function in report key - Xpath
Hi,
I am trying to use Concatenation function on Report key Xpath. For that i am using Following Xpath Expressions But this expressions not valid when trying to validate. But same expressions are valid under different scenarios in OSB.
1.fn:concat(./bpel:process/bpel:input, ./bpel:process/bpel:input)
error msg(when validate):_
error: XPath expression invalid, not a selection: declare namespace jca = 'http://www.bea.
com/wli/sb/transports/jca'; declare namespace wsp = 'http://schemas.xmlsoap.org/ws/2004/09/policy';
declare namespace jms = 'http://www.bea.com/wli/sb/transports/jms'; declare namespace tp = 'http:
//www.bea.com/wli/sb/transports'; declare namespace wsa05 = 'http://www.w3.
org/2005/08/addressing'; declare namespace jejb = 'http://www.bea.com/wli/sb/transports/jejb';
declare namespace xs = 'http://www.w3.org/2001/XMLSchema'; declare namespace sftp = 'http://www.
bea.com/wli/sb/transports/sftp'; declare namespace flow = 'http://www.bea.com/alsb/flow/transport';
declare namespace soap-env = 'http://schemas.xmlsoap.org/soap/envelope/'; declare namespace wsu
= 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'; declare
namespace dsp = 'http://www.bea.com/dsp/transport/sb'; declare namespace ejb = 'http://www.bea.
com/wli/sb/transports/ejb'; declare namespace bpel = 'http://xmlns.oracle.
com/Bpel_Actvities/Assign_Activity/BPELProcess'; declare namespace wsa = 'http://schemas.xmlsoap.
org/ws/2004/08/addressing'; declare namespace bpel-10g = 'http://www.bea.
com/wli/sb/transports/bpel10g'; declare namespace tuxedo = 'http://www.bea.
com/wli/sb/transports/tuxedo'; declare namespace file = 'http://www.bea.com/wli/sb/transports/file';
declare namespace ctx = 'http://www.bea.com/wli/sb/context'; declare namespace fn = 'http://www.w3.
org/2004/07/xpath-functions'; declare namespace soap12-enc = 'http://www.w3.org/2003/05/soap-
encoding'; declare namespace soap12-env = 'http://www.w3.org/2003/05/soap-envelope'; declare
namespace fn-bea = 'http://www.bea.com/xquery/xquery-functions'; declare namespace mq = 'http:
//www.bea.com/wli/sb/transports/mq'; declare namespace ws = 'http://www.bea.
com/wli/sb/transports/ws'; declare namespace http = 'http://www.bea.com/wli/sb/transports/http';
declare namespace soa-direct = 'http://www.bea.com/wli/sb/transports/soa'; declare namespace email
= 'http://www.bea.com/wli/sb/transports/email'; declare namespace sb = 'http://www.bea.
com/wli/sb/transports/sb'; declare namespace ftp = 'http://www.bea.com/wli/sb/transports/ftp';
declare namespace xsd = 'http://www.w3.org/2001/XMLSchema'; declare namespace soap-enc = 'http:
//schemas.xmlsoap.org/soap/encoding/'; declare namespace xsi = 'http://www.w3.
org/2001/XMLSchema-instance'; fn:concat(./bpel:process/bpel:input, ./bpel:process/bpel:input)
2. op:concatenate(./bpel:process/bpel:input, ./bpel:process/bpel:input)
While using this Xpath expression validation is sucessfull but concatenation operation is not working when checked in the message reports under operations tab.
Can any one help me on this.
Thanks in advance.can you try assign concatenated value to some xml element first, like
assign : <value>{fn:concat(a,b)}</value> to e.g. value
and then report key ./text() in variable $value
Edited by: AigarsP on Jun 12, 2012 4:12 AM -
How to use CSS option in Answers
Hi,
I have around 5 Dashboards, which includes close to 20 Reports.
I would like to learn how I can format column name (like Font, Size) and data appearance in each report.
Currently am doing it manually, one column by one column. I would like to know how to use CSS option.
Regards,
JitendraThe easiest way is to do this is to create a new "skin" for your dashboards or either modify the default. The location of the default folder is /res/s_oracle10/b_mozilla/views.css. The view.css file is where you can go and customize the classes. For example, if you want to customize the Pivot Table Row Header, search for .PTRH and then you can alter the existing formatting or add additional specifications.
-
How to use select options whitout ranges ie like parameter
how to use select options whitout ranges ie like parameter and pls send me the code on that
thanks
raja.hi,
SELECT-OPTIONS : s_kunnr for kna1-kunnr <b>no intervels.</b>
eg: code
<b>SELECT-OPTIONS : s_kunnr for kna1-kunnr <b>no intervels.</b></b>
data: itab type table of kna1 with header line.
select * from kna1 into table itab where kunnr IN s_kunnr.
rgds
Anver -
How to use -open option at command prompt
Can someone update me with how to use -open option while launching javaws from command prompt. Sun documnetation (http://java.sun.com/javase/6/docs/technotes/tools/share/javaws.html#runoptions) is not very clear.
I am trying to do something like this
javaws -open prop1 firstName prop2 lastName http://myapp.jnlp
However the above does not work. It says incorrect argument firstName.
Cheers
AmitThe syntax as present in JWS documentation
javaws [run-options] <jnlp>
[run-options] Command-line run-options. run-options may be in any order. For a discussion of the various run-options, see RUN-OPTIONS below.
<jnlp> This can be either the path of, or the Uniform Resource Locater (URL) of the JNLP (Java Network Launching Protocol) file. -
How to use a object for both key figure and as a charcteristc
Dear all,
we have a requirement where in we have to use Version Field as a key figure and as well as a charecteristc.
Regards
venuDear Mayank Gupta
Thxs for ur reply
We are creating a EBIDTA Report which is already developed in R/3 and these result will be stored in Z table.
we have created a DSO which will store this Z table data.
Now the req is we have a created a field called ZVersion which is there in the Key fields of DSO. ok
But in report we want to use the condition TOP1 on the version. as the version is a not a key figure we cant create the Conditon on the characteristc.
If we use version as a key figure then the records are summurised in DSO as u have to insert it in Data Field.
we want to use version as a primary key.
so how to go abt it?
regards.
venu -
Optional Composite Foreign Key
The tool doesn't seem to be handling this correctly when some of the columns are mandatory and others are nullable. I have a composite foreign key where one column is part of the primary key and the other is not. In the Columns properties of the Table dialog, it shows the column that is part of the primary key as mandatory. But on the diagram, the "red dot" indicator is missing. It also give me an error on the Foreign Keys properties when I click OK or Apply.
No, You cant get a composite keys based on two different primary keys. Reason for this can be like unique index is being used when we create any primary key. When we create a composite primary key, one index is created for the two fields and thus one index store the values for two columns involved in the composite primary key and these values are stored in pairs. So when any foreign key references this composite primary key, it will match the data in pairs as it is stored in the index(unique index).
Now when we say to create a composite foreign key based on two different primary keys , we are taking into account two indexes for two different fields. So there is no pairing in these two indexes. So when we will create foreign key using this, it will not get a pair of values or we can say oracle cant get us consistent pair of values from two indexes. So maintaining integrity will not be possible.
Yes you can create two foreign keys on one column which can refer two different primary keys.
Regards -
How to use selction option in reporting
hi experts,
my source file contains data like this
ID QUANTITY YEAR
101 25KG 2005
102 20KG 2005
103 28KG 2005
101 32KG 2006
102 22KG 2006
103 20KG 2006
101 24KG 2007
102 26KG 2007
103 25KG 2007
here in ID column,every ID has repeated in 3 times i.e.. one for 2005,one for 2006 and one for 2007.
i want to change this data by using selection option like bellow mentioned
ID 2005 2006 2007
101 25KG 32KG 24KG
102 20 KG 22 KG 26KG
103 28KG 20KG 25KG
is it possible to change like this,if yes pl help to do this by giving step by step procedure.
thanks & regards
venkatI am assuming ID and year are characteristics
and the quanity is a key figure
Place the ID in the row and
Next place the Year in the column.
Now place the Quantity right below the year
and you should get the desired result
Good luck
Raj -
Using Command-Option-P-R keys the screen is gone black
I have used the Command-Option-P-R keys for resetting the PRAM but now the screen is black and can here the start up sound.
Please help me to slve this probem. I have changed the battery of the logic board but did not find any joy.
Thank you in advance for your assistance.
Original OS:
- Mac OS 10.6.7 Snow Leopard
Model:
- iMac (21.5-inch, Mid 2011)
Codename:
- No codename assigned.
Build Country:
- This unit was built in China
Build Year:
- This unit was built in the second half of 2012.
Build Week
- Week 5 (January) or week 32 (July)Read here > Resolve startup issues and perform disk maintenance with Disk Utility and fsck
-
How oracle locks child table with foreign keys?
I have 3 tables. tab1 , tab2,tab3.
tab2 has FK on tab1.
tab3 has FK on tab2.All the FKs are indexed.
One transaction in my code changes tab3.
One transaction in my code changes tab1,tab2 and tab3.
I am facing deadlock issues on tab3 when both transactions work concurrently.
If I lock tab1 with "for update nowait " at the start of both transaction,will the problem be solved?Let me elaborate on my problem
TAB1
=====
a1 b1 c1
a2 b2 c2
a3 b3 c3
TAB2
=====
x1 y1 z1 a1
x2 y2 z2 a2
x3 y3 z3 a3
(FK indexed)
TAB3
=====
p1 q1 r1 y1
p2 q2 r2 y2
p3 q3 r3 y3
(FK indexed)
Transaction 1 for session1
select * from TAB1 where col1 = a1 for update nowait;
doing activities on tab2 and tab3 depending on the foreign key joins in loop.
Transaction 2 for session 2
select * from TAB1 where col1 = a2 for update nowait;
doing activities on tab2 and tab3 depending on the foreign key joins in loop.
1) Please let me know whether these sessions can head towards deadlock.
2) If some session try to update TAB3 row of y1 when session 1 is still working , how will system behave?
will it go for blocked session or go for dead lock or get an exception message?
Edited by: user9974355 on Dec 17, 2008 11:58 PM
Edited by: user9974355 on Dec 18, 2008 12:00 AM -
How to insert value for composed foreign key?
My problem when I update or insert to table Ffclient which has link 1-1 with other table ClientLoan by composes primary key loanId and clienId (break table). I auto mapping by Jdeveloper 10g version 10.1.2. In FfClient table has two fields compose foreign key of ClientLoan as loanId and clienId not nullable. In toplink object Ffclient it only has one reference ClientLoan object by clientLoan field, not has two fields loanId and clienId . When I insert or update to database, I can't set value for these two fields direct so I have created new ClientLoan object and set value for composed primary key loanId and clienId, after that set it to object Ffclient. But when I update or insert to database it occurs exception about insert null for two not nullable fields: loanId and clienId.
Any one has error as mime? Any one help me correct my error.
Thanks in advance.
Mapping is:
â¦.
<database-mapping>
<attribute-name>ffclientCollection</attribute-name>
<read-only>false</read-only>
<get-method-name>getFfclientCollection</get-method-name>
<set-method-name>setFfclientCollection</set-method-name>
<reference-class>uk.co.lsb.elb.toplink.Ffclient</reference-class>
<relationship-partner-attribute-name>clientLoan</relationship-partner-attribute-name>
<is-private-owned>false</is-private-owned>
<uses-batch-reading>false</uses-batch-reading>
<indirection-policy>
<mapping-indirection-policy>
<type>oracle.toplink.internal.indirection.TransparentIndirectionPolicy</type>
</mapping-indirection-policy>
</indirection-policy>
<container-policy>
<mapping-container-policy>
<container-class>oracle.toplink.indirection.IndirectList</container-class>
<type>oracle.toplink.internal.queryframework.ListContainerPolicy</type>
</mapping-container-policy>
</container-policy>
<source-key-fields>
<field>LSB.CLIENT_LOAN.CLIENT_ID</field>
<field>LSB.CLIENT_LOAN.LOAN_ID</field>
</source-key-fields>
<target-foreign-key-fields>
<field>LSB.FFCLIENT.CLIENT_ID</field>
<field>LSB.FFCLIENT.LOAN_ID</field>
</target-foreign-key-fields>
<type>oracle.toplink.mappings.OneToManyMapping</type>
</database-mapping>
â¦..
<database-mapping>
<attribute-name>clientLoan</attribute-name>
<read-only>false</read-only>
<reference-class>uk.co.lsb.elb.toplink.ClientLoan</reference-class>
<relationship-partner-attribute-name>ffclientCollection</relationship-partner-attribute-name>
<is-private-owned>false</is-private-owned>
<uses-batch-reading>false</uses-batch-reading>
<indirection-policy>
<mapping-indirection-policy>
<type>oracle.toplink.internal.indirection.BasicIndirectionPolicy</type>
</mapping-indirection-policy>
</indirection-policy>
<uses-joining>false</uses-joining>
<foreign-key-fields>
<field>LSB.FFCLIENT.CLIENT_ID</field>
<field>LSB.FFCLIENT.LOAN_ID</field>
</foreign-key-fields>
<source-to-target-key-field-associations>
<association>
<association-key>LSB.FFCLIENT.LOAN_ID</association-key>
<association-value>LSB.CLIENT_LOAN.LOAN_ID</association-value>
</association>
<association>
<association-key>LSB.FFCLIENT.CLIENT_ID</association-key>
<association-value>LSB.CLIENT_LOAN.CLIENT_ID</association-value>
</association>
</source-to-target-key-field-associations>
<type>oracle.toplink.mappings.OneToOneMapping</type>
</database-mapping>Yes, many thanks for you reply.
My project has many layer (include DAO + EJB + BO + WEB).
Toplink objects which are auto created by TopLink has only using in DAO and EJB layer, then toplink objects are transfer to Bean objects (valueObject) which are contain primitive java type as int, long, double... not java wrapper object as Integer, Long, Double... Bean objects are using from EJB to WEB layer. So when set value to bean object from toplink object I sometime don't set all reference toplink object to reference object of bean (although bean has references bean object as toplink object) because there are too big. So when I update data from WEB layer to EJB layer, before update to database, I must get fill all data for foreign key of update object by create new reference toplink object, add reference_id to this object and set it to update object. I waste a lot of time, its very handwork and tire. Are you has any solution about this problem?
Thank in advanced.
ThangNQ -
Hi Experts,
Any one know how to use or what is the purpose of "custom" option present under the data access tab in Excel workbook file format of Data Services
Thanks in Advance,
Rajesh.Rajesh, what is the Custom Protocol you are trying to use? It should be something like PSFTP, etc.,
Cheers
Ganesh Sampath -
How to use Read table with out key fields
Hi Experts,
I need to retrieve the 2 internal tables data into single table.
I have 3 common fields between the 2 tables but I don't have the Key fields. Then how to use the read table in this.
Thanks in Advance.
Edited by: satish4abap on Mar 10, 2010 9:39 AMHi Satish,
Key fields are nothing but the common fields with which you can pick the data from the second internal table.
If you can paste your Internal table fields then we will be able to assit you better.
However, in genral scenarios you can use it as below :
In this scenario, we are putting data from 3 internal table to another single internal table.
LOOP AT T_PRGEN INTO WA_PRGEN.
WA_FINAL-GUID_PR = WA_PRGEN-GUID_PR.
WA_FINAL-ATTR20A = WA_PRGEN-ATTR20A.
WA_FINAL-ATTR05A = WA_PRGEN-ATTR05A.
WA_FINAL-ATTR05B = WA_PRGEN-ATTR05B.
WA_FINAL-ATTR05C = WA_PRGEN-ATTR05C. " + DG1K902190
WA_FINAL-ATTR10A = WA_PRGEN-ATTR10A.
READ TABLE T_V_TCAV201 INTO WA_V_TCAV201 WITH KEY ATTRV20 = WA_PRGEN-ATTR20A BINARY SEARCH.
IF SY-SUBRC = 0.
WA_FINAL-TEXT1 = WA_V_TCAV201-TEXT1. "SUBID-TEXT1
ENDIF.
READ TABLE T_PNTPR INTO WA_PNTPR WITH KEY GUID_PR = WA_PRGEN-GUID_PR BINARY SEARCH.
IF SY-SUBRC = 0.
WA_FINAL-PRVSY = WA_PNTPR-PRVSY. "PROD NO
WA_FINAL-GRVSY = WA_PNTPR-GRVSY. "LOGICAL SYS GROUP
ENDIF.
append wa_final to t_final.
endloop.
Maybe you are looking for
-
Quad only one core in Vista.
Hello, I just set my new system up: P35 Platinum (v1.0 BIOS) Q6600 2gig Gskill 8800GTS X-Fi Vista Home Premium I upgraded from a an Opteron 165 system that had shown both cores. Do I need a BIOS update? I've actually been trying for the past hour to
-
Error installing Oracle 92021 on Windows 2003 Std 64x
Bit of an Oracle newb here, so someone set me strait... I need to install a test instance of Oracle 92x, and I want to install it on my Windows Server 2003 R2 x64 system (AMD Athlon 64 X2 4400+, 4GB RAM, if it matters). I downloaded the Windows 2003
-
So like I said, Everytime I open firefox as soon as I open a tab the "find" bar automatically pops up and I cant type. It wont let me close it at all. Ive searched everywhere to see if I can disable it from automatically coming up but came up empty.
-
Better sleep or shut down to reduce battery power lost for MBP?
better sleep or shutdown the MBP late 2011 because it seems that sleep will make battery loss percentage even a fews...
-
Java_es-5-websuite-ga-windows-x86 installation issue not setting JAVA_HOME
looks like the installer from java_es-5-websuite-ga-windows-x86.zip is not setting the JAVA_HOME variable correctly. C:\Sun\JavaES5\DSEE\dscc6\bin>dsccsetup.exe initialize Failed to create child process ["1/bin/java.exe" -Dsun.directory.clip. [...]