How to seperate the data with comma seperator ??
Hi,
How to seperate the data with comma seperator ??
E.g i havea row like
Userid,number of days,Total Records
user1,10,100000
So,i will get 10,10000 in the same field and i need to seperate 10 and 10000 so what is the abap function for that
Praff
like this ...
SPLIT field AT ',' INTO
userid
days
records.
is this what you need?
Mike
Similar Messages
-
How to sign the data with DHPrivateKey
I am testing DH key exchange protocol. When I run the following code, it works.
import java.io.*;
import java.math.BigInteger;
public class DH2 {
private DH2() {}
public static void main(String argv[]) {
try {
String mode = "USE_SKIP_DH_PARAMS";
DH2 keyAgree = new DH2();
if (argv.length > 1) {
keyAgree.usage();
throw new Exception("Wrong number of command options");
} else if (argv.length == 1) {
if (!(argv[0].equals("-gen"))) {
keyAgree.usage();
throw new Exception("Unrecognized flag: " + argv[0]);
mode = "GENERATE_DH_PARAMS";
keyAgree.run(mode);
} catch (Exception e) {
System.err.println("Error: " + e);
System.exit(1);
private void run(String mode) throws Exception {
DHParameterSpec dhSkipParamSpec;
if (mode.equals("GENERATE_DH_PARAMS")) {
// Some central authority creates new DH parameters
System.out.println
("Creating Diffie-Hellman parameters (takes VERY long) ...");
AlgorithmParameterGenerator paramGen
= AlgorithmParameterGenerator.getInstance("DH");
paramGen.init(512);
AlgorithmParameters params = paramGen.generateParameters();
dhSkipParamSpec = (DHParameterSpec)params.getParameterSpec
(DHParameterSpec.class);
} else {
// use some pre-generated, default DH parameters
System.out.println("Using SKIP Diffie-Hellman parameters");
dhSkipParamSpec = new DHParameterSpec(skip1024Modulus,
skip1024Base);
System.out.println("ALICE: Generate DH keypair ...");
KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH");
aliceKpairGen.initialize(dhSkipParamSpec);
KeyPair aliceKpair = aliceKpairGen.generateKeyPair();
System.out.println("ALICE: Initialization ...");
KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH");
aliceKeyAgree.init(aliceKpair.getPrivate());
byte[] alicePubKeyEnc = aliceKpair.getPublic().getEncoded();
KeyFactory bobKeyFac = KeyFactory.getInstance("DH");
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec
(alicePubKeyEnc);
PublicKey alicePubKey = bobKeyFac.generatePublic(x509KeySpec);
DHParameterSpec dhParamSpec = ((DHPublicKey)alicePubKey).getParams();
System.out.println("BOB: Generate DH keypair ...");
KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH");
bobKpairGen.initialize(dhParamSpec);
KeyPair bobKpair = bobKpairGen.generateKeyPair();
System.out.println("BOB: Initialization ...");
KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH");
bobKeyAgree.init(bobKpair.getPrivate());
byte[] bobPubKeyEnc = bobKpair.getPublic().getEncoded();
KeyFactory aliceKeyFac = KeyFactory.getInstance("DH");
x509KeySpec = new X509EncodedKeySpec(bobPubKeyEnc);
PublicKey bobPubKey = aliceKeyFac.generatePublic(x509KeySpec);
System.out.println("ALICE: Execute PHASE1 ...");
aliceKeyAgree.doPhase(bobPubKey, true);
System.out.println("BOB: Execute PHASE1 ...");
bobKeyAgree.doPhase(alicePubKey, true);
byte[] aliceSharedSecret = aliceKeyAgree.generateSecret();
int aliceLen = aliceSharedSecret.length;
byte[] bobSharedSecret = new byte[aliceLen];
int bobLen;
try {
bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 1);
} catch (ShortBufferException e) {
System.out.println(e.getMessage());
bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 0);
System.out.println("Alice secret: " +
toHexString(aliceSharedSecret));
System.out.println("Bob secret: " +
toHexString(bobSharedSecret));
if (!java.util.Arrays.equals(aliceSharedSecret, bobSharedSecret))
throw new Exception("Shared secrets differ");
System.out.println("Shared secrets are the same");
System.out.println("Return shared secret as SecretKey object ...");
bobKeyAgree.doPhase(alicePubKey, true);
SecretKey bobDesKey = bobKeyAgree.generateSecret("DES");
aliceKeyAgree.doPhase(bobPubKey, true);
SecretKey aliceDesKey = aliceKeyAgree.generateSecret("DES");
Cipher bobCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
bobCipher.init(Cipher.ENCRYPT_MODE, bobDesKey);
byte[] cleartext = "This is just an example".getBytes();
// Signature signature = Signature.getInstance("SHA1withDSA");
// signature.initSign(bobKpair.getPrivate());
// signature.update(cleartext);
// byte[] data = signature.sign();
byte[] ciphertext = bobCipher.doFinal(cleartext);
Cipher aliceCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
aliceCipher.init(Cipher.DECRYPT_MODE, aliceDesKey);
byte[] recovered = aliceCipher.doFinal(ciphertext);
if (!java.util.Arrays.equals(cleartext, recovered))
throw new Exception("DES in CBC mode recovered text is " +
"different from cleartext");
System.out.println("DES in ECB mode recovered text is " +
"same as cleartext");
bobCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
bobCipher.init(Cipher.ENCRYPT_MODE, bobDesKey);
cleartext = "This is just an example".getBytes();
ciphertext = bobCipher.doFinal(cleartext);
byte[] encodedParams = bobCipher.getParameters().getEncoded();
AlgorithmParameters params = AlgorithmParameters.getInstance("DES");
params.init(encodedParams);
aliceCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
aliceCipher.init(Cipher.DECRYPT_MODE, aliceDesKey, params);
recovered = aliceCipher.doFinal(ciphertext);
if (!java.util.Arrays.equals(cleartext, recovered))
throw new Exception("DES in CBC mode recovered text is " +
"different from cleartext");
System.out.println("DES in CBC mode recovered text is " +
"same as cleartext");
}I want to sign the data with Signature,So i add the following code to the sample.
byte[] cleartext = "This is just an example".getBytes();
Signature signature = Signature.getInstance("SHA1withDSA");
signature.initSign(bobKpair.getPrivate());
signature.update(cleartext);
byte[] data = signature.sign();
byte[] ciphertext = bobCipher.doFinal(cleartext);Run the code again, the output is
Error: java.security.InvalidKeyException: No installed provider supports this key: com.sun.crypto.provider.DHPrivateKey
What's wrong with the code, It seems that the bob's private key is not instance of DSAPrivateKey but DHPrivateKey.
what's your comment? thanks a lot.slamdunkming wrote:
thank sabre150 for your reply. But the key pair is generated when I use DH to exchange the secret key. Yes! It is a DH key pair and cannot be used for signing. The DH key pair can only be used for secret sharing.
If I can not use this private key to sign the data, what can i do?Do I have to generate another key pair for signature? In that way, I will have two key pair. Yep. You can generate a DSA or an RSA key pair to be used for signing.
Because I use http protocol to exchange the key to get the shared secret key, Yep.
If I generate another key pair, how can i send the public key to server? Since public keys are 'public' then you can send them in the open to anyone you like. In fact, if you don't publish your public keys then they are pretty much a waste of time. The biggest problem one has with public key is proving 'ownership' - if someone sends me a public key how do I know that the sender is actually who they say they are?.
I am confused.Some reading might help. A pretty good starting point is "Beginning Cryptography with Java" by David Hook published by Wrox. -
How to submit the Data with Business rule auto executed with VBA in excel?
Anyone knows how can I submit the data into planning with the business rule auto executed in planning?
Currently, I am using HypExecuteCalcScriptEx () + HypSubmitData() in my program that auto executed the business rule prior saving the data into planning.
However when it try to run HySubmitData(), the Business rule window pops up again and ask user to run the business rule again.
Therefore, is there a way that I can submit the data with auto execute the business rule?
many thanks, highly appreciate !!!!!!Hi Rafeek,
One solution is to set the column width after manually or programmatically refresh the PivotTable, for example:
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Dim ws As Worksheet
Set ws = Application.ActiveWorkbook.ActiveSheet
ws.Columns("A").ColumnWidth = 10
End Sub
Another option is to set the column width, then protect the columns from been updated by the user, before refreshing the PivotTable, unprotect the worksheet. For example:
Public Sub LockColumnA()
Dim ws As Worksheet
Set ws = Application.ActiveWorkbook.ActiveSheet
ws.Columns("A").ColumnWidth = 10
ws.Columns("A").Locked = True
ws.Protect "123"
End Sub
Public Sub UnprotectWorksheet()
Dim ws As Worksheet
Set ws = Application.ActiveWorkbook.ActiveSheet
ws.Unprotect ("123")
End Sub
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to check the date with current day after 5 days
Hello,
I need to make the visible of delete button in my struts application. I've application in which user can be deactivated. If the user is deactivated and the admin can't delete the user for the specific period of time (set in property file). while deactivating the user, system time is set. and 5 days after the system time's set, i need to make the button visible.
This is my code.
Calendar cal = Calendar.getInstance();
Date deActivatedDate = null;
deActivatedDate =new Date(userData.getDeActivatedTime().getTime());// Set it in the Calendar object
cal.setTime(deActivatedDate); // Add 5 days
cal.add(Calendar.DATE, 5);// get the current date
Calendar currentCal = Calendar.getInstance();
Date currentDate = new Date();
currentCal.setTime(currentDate);// check if the de-activation time is over.
if (cal.get(Calendar.DATE) < currentCal.get(Calendar.DATE)) {
userData.setDeletionAllowed(true);}
can anyone help to solve this issue?What's the problem with the code that you posted?
-
How to analyse the data with &without free form of planning
Hello Expert's,
I am new to this concept's and I want to know the difference between with Free form &without Free form in SmartView of Planning data.I need a navigation path to know the difference between these two.
Thanks in advanceThanks, i think i figured it out. I changed the cpx files in my client projects to point to the new data source.
And i also added the new data source on the Application Server: I added a new data source for each BC4J module (with the Enterprise Manager UI) and i also changed the data-sources.xml files in the directory j2ee/application-deployment and j2ee/applications. -
How to restrict the data with Filter in Query - Updated the description
Hi all,
Free Characteristics: u2018Service Orderu2019 & u2018Statusu2019.
Key Figures: u2018Response Timeu2019 & u2018Data Record Counteru2019.
Calculated Key Figure: u2018Resp Time > 1 hru2019.
Only u2018Plantu2019 is in ROWS and u2018Resp Time > 1 hru2019 & u2018Data Record Counteru2019 are in COLUMNS section.
The report looks like the below:
Plant---Resp Time > 1 hr -
Data Record Counter
100--1--
2
101--1--
3
After dragging the u2018Service Ordersu2019 from u2018Free Characteristicsu2019 , the report looks like the below:
Plant---Service Order -
Resp Time > 1 hr ---Data Record Counter
100--111--
1
100--120--
1
101--130--
1
101--141--
1
101--150--
1
I want only records whose u2018STATUSu2019 is u2018Yu2019. The u2018STATUSu2019 is u2018Blanku2019 for Service Orders 12, 13 & 15
and those records should not be there in the report.
The report should be like the below:
After dragging the u2018Service Ordersu2019 from u2018Free Characteristicsu2019, the report looks like the below:
Plant---Service Order -
Resp Time > 1 hr ---Data Record Counter
100--111--
1
101--141--
1
After creating the Restricted KF u2018Countu2019 on u2018Data Record Counteru2019 by restricting u2018STATUSu2019 to u2018Yu2019 and
dragging the u2018Service Ordersu2019 from u2018Free Characteristicsu2019, the Count shows ZERO :
Plant---Service Order -
Resp Time > 1 hr ---Count
100--111--
0
100--120--
0
101--130--
0
101--141--
0
101--150--
0
If I keep the Filter (globally) on 'STATUS = Y' then it returns 'NO Data'.
If I keep the u2018Service Ordersu2019 is in u2018Rowsu2019 and the Filter on u2018STATUSu2019 (u2018Yu2019) then it works fine, but the report should be based on PLANT.
Thanks in advance.
Reagrds,
Venkat.Hi Gurus,
Thanks for u r all prompt replies...
Got the Solution...
Actually no need to work at query level...
iN Multiprovider.... we can select the WBS element Char for which ever cube data we want... just drop down the char in to the dimension which we need and R/click the Char select identification of participating char.. un-select the check box for char WBS element for the Cubes which we dont require the data......
Thanks to all
Cheers
Lajwanth
Edited by: Lajwanth Singh on Apr 27, 2010 10:41 PM -
How to spool the data with out space
Hi, My version is 10g. I am trying to spool the file. this is my sql file looks like.
set pagesize 0
set heading on
set verify off
set linesize 32767
set trimspool on
set feedback off
set termout off
set colsep '~'
set underline off
set echo off
set term off
sET NEWPAGE 0
--SET SPACE 0
SET MARKUP HTML OFF SPOOL OFF
spool C:\text0728.txt;
SELECT DISTINCT a.m_name, a_code, a.p_id, a.p_name,
a.p_type, e._name, e.s_list from mname a,slist e
where a.p_id=e.p_id;
spool off;
my spool file looks like this
codename~matrix ~888~nametarget ~in~todao~~
codename1~matrix1 ~879~name ~in~todao~
If we see matrix value have space *~matrix ~*
I want the value to spool with out the space i.e *~matrix~*
What to set for my requirment in sql file?
Thanks.select a.m_name,
regexp_replace(a_code,'[[:space:]]matrix[[:space:]]','matrix') as a_code,
a.p_id,
a.p_name,
a.p_type,
e._name, e.s_list *
from
mname a,slist e
where
a.p_id=e.p_id; -
How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.
If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
This page is a good starting point for learning about Flex and PHP communication:
http://www.adobe.com/devnet/flex/flex_php.html
Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/ -
How to take the data from excel list to sap r/3(with time interval)
hi experts,
how to transfer the data from a third party system(if it is in format of excel) to sap r/3.with that in a particular time interval,it will delete the data from excel sheet.Hi
use the Fm
'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_path
i_begin_col = '1'
i_begin_row = '2'
i_end_col = '2'
i_end_row = '500'
giving the starting row and column and passing the ending row and column name
Reward points if useful........
Regards,
Nitin Sachdeva -
Using the "if you have never synched with itunes" instructions, will I lose all data on the phone? That is the most important information, how to recover the data. The phone is fungible.
Thanks @ KiltedTim, but losing "only" any data is really not acceptable and, in this case, the phone had not been backed up, but thanks for taking the time. Also, yes, fungible means what I think it means. An iphone is a completely substitutible commodity, unlike my data, so instructions that inform me as to how to fix a phone I could replace for a small sum of money while failing to address the more important issue of the data are almost useless - they potentially save me the $99 it would cost me to replace the phone if I were so inclined to trust another apple product. Not worth the hour it took to find them or the 35 minutes on the phone to confirm my suspicions about the data.
-
I hav an internal table . I want to download the data using GUI_DOWNLOAD with comma seperator. But condition is condition is i hav to convert the data into CSV format and then download.
How can i do this and send me th coding for exampleFor comma separation ,
report zcsv.
data: lt_poll type table of ypoll.
data: ls_poll type ypoll.
Changes made here
types: begin of ty_singlerow,
rowdata type string,
end of ty_singlerow.
data: lt_singlerow type table of ty_singlerow.
data: ls_singlerow type ty_singlerow.
Changes ends here
select *
from ypoll
into table lt_poll.
Changes made here
loop at lt_poll into ls_poll.
concatenate ls_poll-mandt
ls_poll-POLLID
ls_poll-TEAM
ls_poll-INITIATOR
ls_poll-DESCRIPTION
ls_poll-APPROVED
ls_poll-INITIATED_DATE
ls_poll-END_DATE
ls_poll-WINNER
into ls_singlerow-rowdata
separated by ','.
append ls_singlerow to lt_singlerow.
clear ls_singlerow.
endloop.
Changes ends here
call method cl_gui_frontend_services=>gui_download
exporting
BIN_FILESIZE =
filename = 'RESULTS_POLL.txt'
FILETYPE = 'ASC'
APPEND = SPACE
WRITE_FIELD_SEPARATOR = SPACE
HEADER = '00'
TRUNC_TRAILING_BLANKS = SPACE
WRITE_LF = 'X'
COL_SELECT = SPACE
COL_SELECT_MASK = SPACE
DAT_MODE = SPACE
CONFIRM_OVERWRITE = SPACE
NO_AUTH_CHECK = SPACE
CODEPAGE = SPACE
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = SPACE
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
FILELENGTH =
changing
data_tab = lt_singlerow
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
NOT_SUPPORTED_BY_GUI = 22
ERROR_NO_GUI = 23
others = 24
if sy-subrc <> 0.
write 'Unsuccessful'.
endif. -
How to control the data in data selection
Hi,
how to control the data .
in the transfer structure I am having 10 fields and and the file which is to be loaded contains 7 fields only.where can I control the other 3 fields and how .
thanks in advance
karnaIf your source file is flat file, add extra three fields with blank (just add field separator say comma for each extra field) and then load. It should be ok.
Hope it helps.. -
Dynamically built query on execution How to save the data in Object Type
Hi,
In pl/sql I am building and executing a query dynamically. How can I stored the output of the query in object type. I have defined the following object type and need to store the
output of the query in it. Here is the Object Type I have
CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPE AS OBJECT(
pkid NUMBER,
pkname VARCHAR2(100);
pkcity VARCHAR2(100);
pkcounty VARCHAR2(100)
CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPETAB AS TABLE OF FIRST_RECORDTYPE;Here is the query generated at runtime and is inside a LOOP
--I initialize my Object Type*
data := new FIRST_RECORDTYPETAB();
FOR some_cursor IN c_get_ids (username)
LOOP
x_context_count := x_context_count + 1;
-- here I build the query dynamically and the same query generated is
sql_query := 'SELECT pkid as pid ,pkname as pname,pkcity as pcity, pkcounty as pcounty FROM cities WHERE passed = <this value changes on every iteration of the cursor>'
-- and now I need to execute the above query but need to store the output
EXECUTE IMMEDIATE sql_query
INTO *<I need to save the out put in the Type I defined>*
END LOOP;
How can I save the output of the dynamically built query in the Object Type. As I am looping so the type can have several records.
Any help is appreciated.
Thankshai ,
solution for Dynamically built query on execution How to save the data in Object Type.
Step 1:(Object creation)
SQL> ED
Wrote file afiedt.buf
1 Create Or Replace Type contract_details As Object(
2 contract_number Varchar2(15),
3 contrcat_branch Varchar2(15)
4* );
SQL> /
Type created.
Step 2:(table creation with object)
SQL> Create Table contract_dtls(Id Number,contract contract_details)
2 /
Table created.
Step 3:(execution Of procedure to insert the dynamic ouput into object types):
Declare
LV_V_SQL_QUERY Varchar2(4000);
LV_N_CURSOR Integer;
LV_N_EXECUTE_CURSOR Integer;
LV_V_CONTRACT_BR Varchar2(15) := 'TNW'; -- change the branch name by making this as input parameter for a procedure or function
OV_V_CONTRACT_NUMBER Varchar2(15);
LV_V_CONTRACT_BRANCH Varchar2(15);
Begin
LV_V_SQL_QUERY := 'SELECT CONTRACT_NUMBER,CONTRACT_BRANCH FROM CC_CONTRACT_MASTER WHERE CONTRACT_BRANCH = '''||LV_V_CONTRACT_BR||'''';
LV_N_CURSOR := Dbms_Sql.open_Cursor;
Dbms_Sql.parse(LV_N_CURSOR,LV_V_SQL_QUERY,2);
Dbms_Sql.define_Column(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER,15);
Dbms_Sql.define_Column(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH,15);
LV_N_EXECUTE_CURSOR := Dbms_Sql.Execute(LV_N_CURSOR);
Loop
Exit When Dbms_Sql.fetch_Rows (LV_N_CURSOR)= 0;
Dbms_Sql.column_Value(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER);
Dbms_Sql.column_Value(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH);
Dbms_Output.put_Line('CONTRACT_BRANCH--'||LV_V_CONTRACT_BRANCH);
Dbms_Output.put_Line('CONTRACT_NUMBER--'||OV_V_CONTRACT_NUMBER);
INSERT INTO contract_dtls VALUES(1,CONTRACT_DETAILS(OV_V_CONTRACT_NUMBER,LV_V_CONTRACT_BRANCH));
End Loop;
Dbms_Sql.close_Cursor (LV_N_CURSOR);
COMMIT;
Exception
When Others Then
Dbms_Output.put_Line('SQLERRM--'||Sqlerrm);
Dbms_Output.put_Line('SQLERRM--'||Sqlcode);
End;
step 4:check the values are inseted in the object included table
SELECT * FROM contract_dtls;
Regards
C.karukkuvel -
If Both tables having References then how to insert the data each other
Hai EveryOne..,
My Sample data.,
Create table emp (empno number primary key,ename varchar2(20));
Create table emp_dup (empno number references emp(empno),ename varchar2(20) primary key);
alter table emp add constraint ename_fk foreign key(ename) references emp(ename);
My Question is How to insert the data into these two tables?
Its a *"Circular Reference"* Concept.
Please ...
Thank You!!You need to set the DEFERRED clause of the constraint when you create your foreign key as DEFERRABLE by which you can move the constraint validation at transaction level.
In an interview point of view that could be a reasonable answer. But in real time this could be strongly questionable.
Here is an example
SQL> create table emp1 (empno number, ename varchar2(10))
2 /
Table created.
SQL> create table emp2 (empno number, ename varchar2(10))
2 /
Table created. Define Primary Key for two tables
SQL> alter table emp1 add constraint emp1_pk primary key (empno)
2 /
Table altered.
SQL> alter table emp2 add constraint emp2_pk primary key (ename)
2 /
Table altered. Add foreign key for two tables with DEFERRED clause set as DEFERRABLE
SQL> alter table emp1 add constraint emp1_fk foreign key (ename) references emp2(ename) initially deferred deferrable
2 /
Table altered.
SQL> alter table emp2 add constraint emp2_fk foreign key (empno) references emp1(empno) initially deferred deferrable
2 /
Table altered. Now here is the test case
SQL> insert into emp1 values (1, 'karthick')
2 /
1 row created.
SQL> commit
2 /
commit
ERROR at line 1:
ORA-02091: transaction rolled back
ORA-02291: integrity constraint (ARBORU.EMP1_FK) violated - parent key not found So the validation is done at Transaction level. Now let insert the value into both tables.
SQL> insert into emp1 values (1, 'karthick')
2 /
1 row created.
SQL> insert into emp2 values (1, 'karthick')
2 /
1 row created.
SQL> commit
2 /
Commit complete. -
How to filter the data on Reports from collected from differnet Agents
1) I have to write a Plug-in which would fetch the same type of data from 7 Agents. I need to generate the report for each Agent separately,This plug-in will be deployed in various different environment. So I will not know the host name as it will be deployed different environment. Can anyone suggest how to filter the data for each agent from the table. I see one solution of using Bind variable for the Target GUID in PL/SQL file. Can you please suggest if there is any other better way of doing this.????
Also Can you please suggest what are the best ways to debug the OEM Plug-in?
Thanks Anyway.....What I mean filtering data means displaying data for each Agent Seperatly. Assume I have collected Filesystem data from 5 Agents (5 different server). Now I want do display file system data for Agent1 (server 1). How would I fetch it from MGMT$Metric_Current. Currently I use a bind variable
??EMIP_BIND_TARGET_GUID?? to filter the data for a Agent from MGMT$Metric_Current view. I compare Target Name entered while deploying Plug-in with the Target_Name column of specified view.Is there any other way of fetching data from this table for a Agent?
I hope I am prety clear now. My Problem is IO dont want to force user to enter exact Server name while deploying Plug-in.
Thanks......
Maybe you are looking for
-
A few bumps from whs to Server 2012 R2 Essentials
I'm a typical WHS user looking to upgrade (non-business use) for a simple storage area and being able to back up the laptops and PCs in the house. Problem not solved: Perhaps not a Server 2012 r2 Essential problem but my WDTV Live can't access the sh
-
Dear All Friends, My client create one sales order for a month, and plant delivery person will generate deliveries every day like 30 delivery for a month, and user create one collective invoice for 30 delivery. Now I want that deliveries are block fo
-
Hi, For FI documents generated from GR (MIGO) and IV (MIRO), can we update the text field with certain values from the material documents? In fact, we would like to always populate the text field of FI documents from sub modules. What would be the be
-
Data Modeler - Source/Target Name
I have imported a logical model from Oracle Designer and need to show the "source/target" names. I could do this easily in version 2 of the Data Modeler through the Logical Model , "Show Source/Target Name" option of the Diagram pane (from Tools | Ge
-
Unrecognized Filesystem error when mounting dmg
Ok. So my problem is this. My MacBook Pro became unresponsive, when I booted, it gave a question mark on the white screen instead of starting Snow Leopard. Still don't know why, but that isn't really important now. When this happened I got my snow le