How to delete parent table data even though it has child records
hi all,
How to delete parent table data even though it has child records.
ex: delete from pa_request cascade constraints;
But this command is not working .
Regards,
P Prakash
833560 wrote:
ex: delete from pa_request cascade constraints;cascade constraints is DROP table option. It can't be used with DELETE. You need to delete child rows first or drop foreign keys and recreate them with ON DELETE CASCADE. Then:
delete from pa_request will automatically delete child rows. However, personally I don't like ON DELETE CASCADE. You can, by mistake, delete half of your database without even realizing it.
SY.
Similar Messages
-
Hi Guyz,
Was able to delete entries from master table even though I have entries in detail table. I defined foreign key in detail table field refering to master table field. I am working on ECC6.0. Does any body got same problem ?
Regards,
Venkat.You have a master table : For eg: Code Type
with some values
like
Fields:CODE_TYPE(Primary key *) CODE_DESC
ENCL Enclosure
NACO Nature of concern
PORT Port code
Another detail table with
Fields:
CODTYP(#) CODE () CODDESC
ENCL 2 Insurance Certificate
ENCL 3 Quality Certificate
ENCL 4 SAARC Preferential Trade Agreement
Fields CODTYP also has foreign key(#) reference
to first table Code type(Check table)
You deleted CODE_TYPE: ENCL from the first table: Code Type
The system will allow this type of deletion.
But when you try to add a new entry with codtyp = 'ENCL'
Next time it will raise error message saying that value doesnot exit in check table.
If you want to have a check whether its used in details table at master table entry deletion time, you may have to write some extra form in deletion event in TMG. -
How to delete partition table data of Solman 7.01
Hi, all.
The partition table size such as '/BI0/F0CCMARSH' of Solman is too big. It's almost 60GB include of index.
And there are a many of partition table and sum of partition table is 125GB.
Let me know the SAP report to remove the needless data?
Best Regards1. Execute t-code RSA1
2. Select the menu > InfoProvider.
3. Search the vaild InfoProvider with partition table name.
4. You can remove all data using popup menu 'Delete Data'
5. or select the popup menu 'Manage' to delete data of the specific day. -
Deleting the data even though the subqery fails
Hi,
The following query is deleting the entire data from the table temp_test, even though the table test_temp1 that we are using in the subqery is not having the column test.
delete from temp_test where test in (select test from temp_test1 where test1 in ('d'))
Here when we execute only sub query it is showing the error "Invalid Identifier". But when we execute the entire query it is deleting the complete data of temp_test.
The table structure is:
Temp_test (test varchar2(2))
Temp_test1 (test1 varchar2(2))
Table data:
Temp_test is having Some data.
Temp_test1 is having 'd' as one of it's row.
Could any one explain me how this statement is getting executed without giving any error.
Thanks in advance.delete from temp_test where test in (select test from temp_test1 where test1 in ('d'))
is equivalent in your case to
delete from temp_test where temp_test.test in (select temp_test.test from temp_test1 where test1 in ('d'))
HTH
Laurent Schneider
OCM DBA -
How to delete the duplicate data from PSA Table
Dear All,
How to delete the duplicate data from PSA Table, I have the purchase cube and I am getting the data from Item data source.
In PSA table, I found the some cancellation records for that particular records quantity would be negative for the same record value would be positive.
Due to this reason the quantity is updated to target but the values would summarized and got the summarized value of all normal and cancellation .
Please let me know the solution how to delete the data while updating to the target.
Thanks
Regards,
SaiHi,
in deleting the records in PSA table difficult and how many you will the delete.
you can achieve the different ways.
1. creating the DSO maintain the some key fields it will overwrite the based on key fields.
2. you can write the ABAP logic deleting the duplicate records at info package level check with the your ABAPer.
3.you can restrict the cancellation records at query level.
Thanks,
Phani. -
I uninstalled Flash Builder 4.7 using the uninstall app. I'd like to re-install the app, but Creative Cloud says it's up-to-date, even though it does not exist anymore on my computer. How can I re-dowload it?
CC desktop lists applications as "Up to Date" when not installed
http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html -
How do I install InDesign CC when the app overview says "up to date" even though I haven´t installed anything yet?
It sounds like maybe you installed a trial at some point in the past and trashed the application folder rather than doing an uninstall?
Have you tried the cleaner tool:
Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6 -
Hey people please help me with my problem.
I purchased a VIP subscription for a week in starmakerstudios karaoke. I don't know how to stop auto renewal. Even though I have deleted the app, I'm still being charged $1.99 a week!
Please help me out...Hi Gerald,
Well, you're not alone. The question is why is this happening? Since the referenced link shows the same type of problem with Yahoo finance, I suspect there is a coding problem on the site, specific to how Firefox is reading the code. Not being a programmer, I can't offer specific advice other than contacting either Firefox through their Community forum, or Yahoo Finance. -
How can we delete SID table data and Text table data
Hi,
How can we delete SID table data and Text table data of any
InfoObject.Hi,
Go to transaction SE14, give the technical name if the table:
/BIC/T<InfoObject Name> for Text Table
/BIC/S<InfoObject Name> for SID Table
Select "Table" in the given 4 options below & hit Edit button.
in the next screen select "Direct"
& also select "detele data" radio button.
& hit "Activate & adjust database".
this will delete the complete data from the tables.
Note: before deleting the SID's make sure of the consequences & after effects.
Also the SID gets generated the next time you load master data/transaction data only for those records which were loaded..
Regards,
Iliyas -
How to delete the Hierarchy data from Infoobjects.
How to delete the Hierarchy data from Infoobjects. In my case I had 300 records in the corresponding table of info object.
When i was trying to delete the hierarchy data, I am getting error message. "Some master data not deleted". Can any one tell me to delete all these records by using a program.Hi
Go to SE11 and enter the hierarchy table name.
/BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
Thanks
TG -
How to Populate Internal table data to Table Control in a Report Program
Dear All,
How to Populate Internal table data to Table Control in a Report Program? It is a pure report program with out any Module pool coding involved, which is just used to display data. Till now it is being displayed in a report. Now the user wants the data to be displayed in a table control. Could someone tell me how to go about with this.
Thanks in Advance,
Joseph ReddyIf you want to use a table control, you will need to create a screen.
In your report....
start-of-selection.
perform get_data. " Get all your data here
call screen 100. " Now present to the user.
Double click on the "100" in your call screen statement. This will forward navigate you to the screen. If you have not created it yet, it will ask you if you want to create it, say yes. Go into screen painter or layout of the screen. Use the table control wizard to help you along the process. It will write the code for you. Since it is an output only table control, it will be really easy with not a lot of code.
A better way to present the data to the user would be to give it in a ALV grid. If you want to go that way, it is a lot easier. Here is a sample of the ALV function module. You don't even have to create a screen.
report zrich_0004
no standard page heading.
type-pools slis.
data: fieldcat type slis_t_fieldcat_alv.
data: begin of imara occurs 0,
matnr type mara-matnr,
maktx type makt-maktx,
end of imara.
* Selection Screen
selection-screen begin of block b1 with frame title text-001 .
select-options: s_matnr for imara-matnr .
selection-screen end of block b1.
start-of-selection.
perform get_data.
perform write_report.
* Get_Data
form get_data.
select mara~matnr makt~maktx
into corresponding fields of table imara
from mara
inner join makt
on mara~matnr = makt~matnr
where mara~matnr in s_matnr
and makt~spras = sy-langu.
endform.
* WRITE_REPORT
form write_report.
perform build_field_catalog.
* CALL ABAP LIST VIEWER (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = fieldcat
tables
t_outtab = imara.
endform.
* BUILD_FIELD_CATALOG
form build_field_catalog.
data: fc_tmp type slis_t_fieldcat_alv with header line.
clear: fieldcat. refresh: fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = 'Material Number'.
fc_tmp-fieldname = 'MATNR'.
fc_tmp-tabname = 'IMARA'.
fc_tmp-outputlen = '18'.
fc_tmp-col_pos = 2.
append fc_tmp to fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = 'Material'.
fc_tmp-fieldname = 'MAKTX'.
fc_tmp-tabname = 'IMARA'.
fc_tmp-outputlen = '40'.
fc_tmp-col_pos = 3.
append fc_tmp to fieldcat.
endform.
Regards,
Rich Heilman -
How to handle multiple tables data in Entity Beans?
How to handle multiple tables data in Entity Beans?
i mean, my bean (non trivial) is responsible for frequent
insertion in one table and some deletion on another table.
Can anyone of you...please..?Is your data model right? If you are adding in one and deleting in another it sounds to me more like a process that an entity, in which case you may revisit your data model and simplify it, add in a session bean with the process method to co-ordinate between the two.
However, if you want to map multiple different tables within a single entity bean it is possible and just part of the mapping. How you actualyl specify it depends on which implementation you are working with.
Cheers,
Peter. -
ADF Desktop Integration : How to delete the table in Excel?
Hi,
I am using Jdev 11.1.1.3.0 and Excel 2007 for Oracle ADF DI, I had created an ADF table using pageDef file in the excel. Now I wanted to delete that table and use a different pageDef file.
I could not find a way to delete that table.
I deleted full row of tables and then I used different pageDef file and created a new adf table. But when I am running this version of excel, I am getting runtime exception and excel is getting corrupted.
My question how to delete the table not corrupting the Excel.
Thanks
PavanPavan,,
Welcome to OTN.
You can delete the table by selecting the top left column (of the table) and then select delete from the ADFdi tab.
Refer the documentation for more info.
http://docs.oracle.com/cd/E17904_01/web.1111/e10139/get_start_dev_tools.htm#ADFDI608
-Arun -
How to delete back up data in icloud?
How to delete back up data in iCloud?
From previous posts:
If you mean backed up in your iCloud backup, you can delete the backup by turning off iCloud Backup in Settings > iCloud > Storage & Backup, then tap Manage Storage, touch your backup and tap Delete Backup, then go back and turn iCloud Backup back on again.
If you mean data synced to your iCloud account like contacts and calendars, you can either delete if from your device or go to icloud.com on your computer and delete it there. -
Hi everyone, again landed up with a problem.
After trying a lot to do it myself, finally decided to post here..
I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
Because both the tables have same number of columns & column names.
Below are 2 tables with column names:
Table-1 (MONTHLY_PART_1)
Table-2 (MONTHLY_PART_2)
SL_NO
SL_NO
COMP
COMP
DUE_DATE
DUE_DATE
U-1
U-1
U-2
U-2
U-4
U-4
U-20
U-20
U-25
U-25
Since both the tables have same column names, I'm getting the following error :
Error 402 at line 103, column 4
alias required in SELECT list of cursor to avoid duplicate column names.
So How can i export the data to excel which has 2 tables with same number of columns & column names?
Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
Help me with this please.
Thank You.You'll have to *alias* your columns, not prefix it with the table names:
$[CHE_TEST@asterix1_impl] r
1 declare
2 cursor cData is
3 with data as (
4 select 1 id, 'test1' val1, 'a' val2 from dual
5 union all
6 select 1 id, '1test' val1, 'b' val2 from dual
7 union all
8 select 2 id, 'test2' val1, 'a' val2 from dual
9 union all
10 select 2 id, '2test' val1, 'b' val2 from dual
11 )
12 select a.id, b.id, a.val1, b.val1, a.val2, b.val2
13 from data a, data b
14 where a.id = b.id
15 and a.val2 = 'a'
16 and b.val2 = 'b';
17 begin
18 for rData in cData loop
19 null;
20 end loop;
21* end;
for rData in cData loop
ERROR at line 18:
ORA-06550: line 18, column 3:
PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
ORA-06550: line 18, column 3:
PL/SQL: Statement ignored
$[CHE_TEST@asterix1_impl] r
1 declare
2 cursor cData is
3 with data as (
4 select 1 id, 'test1' val1, 'a' val2 from dual
5 union all
6 select 1 id, '1test' val1, 'b' val2 from dual
7 union all
8 select 2 id, 'test2' val1, 'a' val2 from dual
9 union all
10 select 2 id, '2test' val1, 'b' val2 from dual
11 )
12 select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
13 from data a, data b
14 where a.id = b.id
15 and a.val2 = 'a'
16 and b.val2 = 'b';
17 begin
18 for rData in cData loop
19 null;
20 end loop;
21* end;
PL/SQL procedure successfully completed.
cheers
Maybe you are looking for
-
How to call rfc with byte[] parameter?
I am building a middleware using SAP.NET connector but Im having a problem with a particular rfc. I am using C# and my problem basically is abut PIDs( persistent instance id, call list id). PIDs are composed of 32 characters(hexstring), 16 bytes in h
-
Apr 9 20:49:13 server.example.com clamd[27683]: Can't get file status Apr 9 20:49:13 server com.apple.launchd[1] (org.clamav.clamd[27683]): Exited with code: 1 Apr 9 20:49:13 server com.apple.launchd[1] (org.clamav.clamd): Throttling respawn: Will
-
Obsolete GPIB-USB-A problem again
Hi , all, sorry to bother you but I really do not know how to deal with this, I have a obsolete GPIB-USB-A cable to connect with an instrument, this morning I installed NI488.2 V2.2 on WinXP, it works, the instrument responds to my commands. This a
-
Constant pse 9 organizer crash on mac
Hello, I am on a MacBook Pro Core 2 Duo and Organizer constantly crashes immediately upon opening. A few days ago I had posted this problem with a trial version of pse 9 and meanwhile despite the problem purchased the software hoping it was only a bu
-
Hi, I am a Blackberry Newbie, but I have been using Macs and PCs since 1988. I can tell you this is not very good support system. I should have an email address to send this to rather than letting it fly to a forum, sorry forum not your fault. 1) I g