Using Delete in SQL_DML
Hi all,
I am Using 2 structures for update insert and delete.
All the records would be inserted first.and need to delete if Status=0 or O.
how to define structure for this and what is the SQL query.
Thanks,
Srinivasa
Hi
Refer SAP help doc for this
http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
UPDATE dbTableName SET col1=u2019val1u2019, col2=u2019val2newu2019
WHERE ((col2=u2019val2oldu2019 AND col4=u2019val4u2019) OR (col2=u2019val2old2u2019))
<StatementName1>
<dbTableName action=u201DUPDATEu201D | u201CUPDATE_INSERTu201D>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2new</col2>
</access>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName>
</StatementName1>
Thanks
Swarup
Edited by: Swarup Sawant on Dec 30, 2008 10:49 AM
Similar Messages
-
I use Apple's wireless keyboard to type email messages on my ipad. Often applications, such as Mail, would shut down suddenly after using "delete" key on the wireless keyboard. This happens when I am typing in Japanese language. It is really annoying because I will lose all the text that are not saved. Any suggestions?
Sorry but that was a completely pointless post.
-
How to change color when I using delete button?
Hi experts,
When I using delete button on input schedule before enter any data, it display the same color on the data range, how can fix the color after using delete button? or is it a formatting problem?
BPC ver : 7.5 sp3 for NW
best regard
Evans.Evans,
Is delete button custom made? i think it is possible with Formatting Range.
check the below for advanced formatting.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70573b01-657a-2b10-a2b2-ec54bb0a9c8c?quicklink=index&overridelayout=true
I think you need use CHANGED as value for CRITERIA. I don't think NW doesn't support CHANGED value for CRITERIA i guess.
Thanks,
Ben. -
Problem using DELETE ADJACENT DUPLICATES with dynamic table
Hello All,
In my program i have to delete duplicate records from dynamic table.
I tried using DELETE ADJACENT DUPLICATES FROM <DYN_TABLE> COMPARING <fieldname1> <fieldname2> but it fails in syntax check, then i tried like below:
DATA string type string.
string = '<fieldname1> <fieldname2>.........'.
DELETE ADJACENT DUPLICATES FROM <DYN_TABLE> COMPARING (string).
It also got failed at runtime.
Please suggest how can i achieve this....
Regards
Munish GargHi,
this code is worked truly.
You can try this.
Regards.
DATA itab LIKE STANDARD TABLE OF mard.
SELECT * FROM mard INTO TABLE itab UP TO 100 ROWS.
* You define max number of the field that you need
data : cmp01 TYPE string,
cmp02 TYPE string,
cmp03 TYPE string,
cmp04 TYPE string,
cmp05 TYPE string.
* You fill the fields that you need, others is clear.
cmp01 = 'MATNR'.
cmp02 = 'WERKS'.
CLEAR : cmp03,cmp04,cmp05.
SORT itab BY (cmp01) (cmp02) (cmp03) (cmp04) (cmp05).
DELETE ADJACENT DUPLICATES FROM itab COMPARING (cmp01) (cmp02) (cmp03)
(cmp04) (cmp05). -
Using: Delete Adjacent Duplicates
Hi,
How can we use Delete Adjacent Duplicates where comparing clause is dynamic.
The the number of comparison characteristics are dependent on some other conditions and are decided at runtime. Also can this be used with Field-Symbols.
ArunavaHi Arunava,
The following were taken from ABAP key word documentation.
1. The DELETE ADJACENT DUPLICATES statement works particularly well if you have sorted the internal table itab according to the fields that you want to compare when looking for duplicates. In this case, deleting adjacent duplicates is the same as deleting all duplicates. The direction of the sort is irrelevant.
2. <b>If you do not know a comparison expression until runtime, you can specify it dynamically as the contents of the field name in the expression COMPARING ... (name) .... If name is empty at runtime, the comparison expression is ignored. If name contains an invalid component name, a runtime error occurs.</b>
3. You can further restrict comparison expressions - both static and dynamic - by specifying offset and length.
Regards
Raja -
Cannot use delete key or back space on the keybord in Sun Java St. Creator!
Happy new year Java fans!
I have a small problem but annoing me a lot!!
Cannot use delete key or back space on the keybord in Sun Java St. Creator! It is ok outside the creator!!
I am using solaris 10 on x86 machine.
Thanks for helpSimilar issues have been filed against netbeans and mostly they seem to happen when the keybindings have been modified:
- http://www.netbeans.org/issues/show_bug.cgi?id=68151
This is a bug in new Options dialog. To make it work, just delete the wrongly
defined shortcuts in xmls in ~/.netbeans/dev/config.
- http://www.netbeans.org/issues/show_bug.cgi?id=67351
btw, can you run creator with a different userdir (by renaming the existing userdir) and see if the problem still persists? If it does not, then it would mean there is some keybinding setting in the current user directory that is causing this problem. -
How to use 'DELETE ADJACENT DUPLICATES FROM' for deleting as some field
How to use 'DELETE ADJACENT DUPLICATES FROM' for deleting as some field
eg:
I have a inner table ,it contains a field named ast_guid,now,I search ten records,contains some duplicate records in the field of ast_guid.but I can not delete the duplicate records as ast_guid.If the type of inner table is standard table, you should sort the inner table by the fields before user 'DELETE ADJACENT DUPLICATES ', and use COMPARING addtion.
Edited by: Justin on Jun 28, 2009 9:48 AM -
Using "Deleted Items" folder for long term storage.
I have a user that is using the "Deleted Items" folder in Outlook for long-term storage. He has unchecked the box in the options which would remove the items in the Deleted Items folder at shutdown
and is having problems with his Outlook freezing up several times a day. He was using a Microsoft Surface as his primary computer and has since changed to a Dell Latitude, but Outlook still freezes up. He has an Office 365 Pro Plus license.
I have been looking for articles to explain all the reasons for not using "Deleted Items" for storage, but in order to get him to change, This is not a .pst, it is the Outlook default “Deleted Items”.
. I really need some "ammunition" to let him know the consequences of keep that much mail in Deleted Items.
Could you tell me when Outlook starts, does it enumerate the Deleted Items folder as it does the Inbox?I have to agree with Robert's point here. The question of whether or not the user should be doing this answers itself: of course he shouldn't. On a lighter note there's a Dilbert cartoon from 2003 which covers this very point:
http://dilbert.com/strips/comic/2003-11-13/
I'd suggest you ask him to create a sub-folder of his inbox and get him to move everything over, then he still has his history and can use deleted items the way it was intended.
The question I would ask is are you sure that this has any bearing on his Outlook freezing issue? I have encountered people who never empty their recycle bin and I have encountered issues with Outlook freezing, but I don't recall ever having the two together.
If you still have issues after he's moved everything then it's a general Outlook freezing issue, so you have to look at those sort of things. For a start, is it bang up to date with Microsoft Updates? If so how big is his mailbox? Presumably he has an ost
file, so how big and fragmented is that? I'd probably try creating a new Outlook profile. If not then what add-ins does he have, could they all be disabled for a while to see if it's one of them, then add them back one at a time? If not is it worth running
a repair in Office? I've had that fix a fair few issues.
Just a few thoughts. I don't know if any of them will help. -
More efficient one. Select Db and then delete OR using DELETE stmt on DB
Hi Gurus,
Which is more efficient one.
1. Select from Database on some condition.
Then use delete statement on smae DB
2. Delete from DB on some condition.The efficient method is
SELECTING REQUIRED FIELDS AND THEN SORT THE TABLE AND PERFORM DELETE OPERATION LIKE
1) SELECT (REQFIELDS)
FROM spfli
INTO TABLE itab
WHERE carrid = 'LH'.
2) SORT itab BY cityto.
3) DELETE ADJACENT DUPLICATES FROM itab COMPARING cityto.
It has reasonable amount of completing the transaction -
People Please help, I forgot my security questions answers but I know how to reset them but the problem is my rescue email is not longer used ( DELETED ) so what can I do please help me??????????
EZZTHEKILLER wrote:
is there any other way ...
Not in your case.
EZZTHEKILLER wrote:
I forgot my security questions answers but I know how to reset them but the problem is my rescue email is not longer used ( DELETED ) -
What is the difference between 'command delete' and using 'delete original and all versions'?
My masters are not referenced and I usually have only one version. What is the difference between using 'command delete' versus going to the top menu bar and using 'dele
Good question .
When the Version is the only Version based on the Original of that Version, the two commands have the same effect.
See this User Tip by master Aperturist Frank Caggiano. -
Using delete and FOR ALL ENTRIES
Hi,
We have a error message regarding the following code :
Delete FROM TABLE FOR ALL ENTRIES IN lt_TABLE WHERE
TABLE_KEY1 = LT_TABLE_KEY1
Could we use the For All entries with "Select" ?
For information, the error message is "Unable to interpret "FOR". Possible causes: Incorrect spelling or comma error.
Thank you.Hi,
Check the below syntax, if you want to delete from database
DELETE FROM sflight
WHERE carrid = p_carrid AND
fldate = sy-datum AND
seatsocc = 0.
Just a suggestion. May be from next time you can use F1 help for syntax:
1. Place the cursor on the delete keword in your program and press F1 - You willl get all the possible syntax for delete statement
2. Else open the transaction ABAPDOCU, Click Keyword Help, Enter the required keyword(delete in this case) and press cont.. You will get the syntax.
Hope thsi will help you.
Regards,
Swarna Munukoti. -
So, the problem is,
I used these school Macs right? They're school handed and stuff. Then one day I decided I want admin so I do this thing where I "reset" everything on the Macbook using this Video (at the bottom) http://www.wikihow.com/Reset-a-Lost-Admin-Password-on-Mac-OS-X
Then I do it, it takes me to the new User. That's not what I want so I shut down, then made an account with the same name as my current account (let's call it Y). Then I delete Y on purpose. I deleted it because I didn't want my school to know I had this account. Realise I wanted it again so I made an account, let's call it X then when I have X I deleted Y. Then I realised my AirDrop name said X so then I made a new account, this time let's call it Z, with Z I delete X and then I deleted Z because I don't want my school to know I have Z but then Z is also the same name as my main/current account. Somehow or something I delete my current account leaving me with Z. Now I can see my account and stuff but don't know how to restore it.
Picture will be provides later.
PLEASE PLEASE PLEASE HELP ME. I HAVE SCHOOL TOMORROW AND I DON'T WANT MY PARENTS TO FIND OUT.It is a bad idea to hack computer passwords when you don't own the computer
Good luck with the school and the parents. -
Please help me urgently (Problem in using delete statement)
Hello,
I want to run delete query where table name should come from a variable .I have written the following procedure but its not working .Could you please help me
DECLARE
processtemplatename VARCHAR2(64);
CURSOR T1Cursor IS
select Process_template_name from ProcessTemplate
where PROCESS_template_ID in
( select PROCESS_template_ID from PROCESSINSTANCE
where process_instance_id in
(select process_instance_id from processinstance where STATUS = 'PI_COMPLETED' OR STATUS = 'PI_REMOVED' ));
BEGIN
OPEN T1Cursor;
LOOP
FETCH T1Cursor INTO processtemplatename;
EXIT WHEN T1Cursor%NOTFOUND;
DELETE FROM processtemplatename WHERE process_instance_id in
( select process_instance_id from PROCESSINSTANCE where STATUS = 'PI_COMPLETED' OR STATUS = 'PI_REMOVED' );
END LOOP;
CLOSE T1Cursor;
END;
I am getting the error
ERROR at line 19:
ORA-06550: line 19, column 27:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 19, column 15:
PL/SQL: SQL Statement ignored
even when i used
DECLARE
processtemplatename VARCHAR2(64);
BEGIN
processtemplatename := 'example1';
DELETE FROM processtemplatename WHERE process_instance_id in
( select process_instance_id from PROCESSINSTANCE where STATUS = 'PI_COMPLETED' OR STATUS = 'PI_REMOVED' );
END;
I am still getting the same error message
Thanks,
Salam.And BTW you do not need that clumsy CURSOR c.. OPEN c.. FETCH c INTO... CLOSE c etc. It is "reserved" for more complex cases when you cannot use:
<pre>
FOR P IN
select Process_template_name
from ProcessTemplate
where PROCESS_template_ID in
(select PROCESS_template_ID
from PROCESSINSTANCE
where process_instance_id in
(select process_instance_id
from processinstance
where STATUS = 'PI_COMPLETED'
OR STATUS = 'PI_REMOVED'
LOOP
EXECUTE IMMEDIATE
'DELETE FROM ' || P.Process_template_name ||
' WHERE process_instance_id in
(select process_instance_id
from PROCESSINSTANCE
where STATUS = ''PI_COMPLETED'' OR STATUS = ''PI_REMOVED''
END LOOP;
</pre> -
Can't delete messages using delete key in Outlook 2007
After upgrading to Exchange 2010, we are seeing an intermittent problem where users in Outlook 2007 can't delete messages from their inbox using the delete key. Opening the message and clicking delete from there will delete it from the inbox.
They can also drag the messages from the inbox to deleted items.
The issue comes and goes during the day. One minute delete will work and then it won't and then it will again.
Thanks,
CrystalHi Crystal,
How many uses have the issue?
Did you check the Outlook add-in or Anti-Virus application?
Please check whether there is any error/warning event in the Event Viewer.
Please recreate the Outlook profile for user if possible.
Please try to run the cmdlet New-MailboxRepairRequest.
http://technet.microsoft.com/en-us/library/ff625226.aspx
Frank Wang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Maybe you are looking for
-
Posting Incoming Payment thru R-28
Hi , While posting incoming payment thru f-28 on simulation the second line item is Highlighted on entry of text & assignment we are able to post the document. I want to know where and what changes are done to get this feature. Thanks Surojit
-
SOAP with SSL in weblogic 5.1
Hello! Any idea of using SOAP with SSL in weblogic 5.1.?? My webservice works properly when I use http, but it doesn't work with http. It's very important to me, to get a solution for this problem!! Many thanks. Best regards, Rafa.
-
AP boots fine on ac power but drops power entirely upon connecting ethernet cable.
-
Is there a command or a way to refresh many snapshot at the same time.. Message was edited by: Simon
-
Actionscrip 3 How to adjust script
Hi, I have a shooting game script and an fla that i am trying to modify, to add an intorduction scene. Can anyone give me any help on how to do this, here is the actionScript im working with; package import flash.display.Sprite; import flash.