|
Re: DELETE [message #359095 is a reply to message #359093] |
Thu, 13 November 2008 13:14   |
joicejohn
Messages: 327 Registered: March 2008 Location: India
|
Senior Member |
|
|
@oliveiraum,
Please read OraFAQ Forum Guide.
After that can you please post what actually you tried with the help of a test case and where exactly you faced the problem in achieving the result.
Regards,
Jo
|
|
|
Re: DELETE [message #359126 is a reply to message #359093] |
Thu, 13 November 2008 16:33   |
oliveiraum
Messages: 16 Registered: November 2008
|
Junior Member |
|
|
Hello!!
IF
select * from APP_TMP_FVENDAS_WORK T where T.NIF IN(
SELECT NIF FROM APP_TMP_FVENDAS
)
THEN
DELETE * From APP_TMP_FVENDAS_WORK
END IF;
here is part of the code....
regards
rui
mod: added code tags
[Updated on: Thu, 13 November 2008 16:36] by Moderator Report message to a moderator
|
|
|
|
Re: DELETE [message #359225 is a reply to message #359093] |
Fri, 14 November 2008 03:45   |
oliveiraum
Messages: 16 Registered: November 2008
|
Junior Member |
|
|
hello!!!
IF
select NIF from APP_TMP_FVENDAS where PROCESSED_FLG = 'Y' and here exists (
SELECT NIF FROM APP_TMP_FVENDAS
)
THEN
DELETE From APP_TMP_FVENDAS_WORK
Do you mean like this?
will it erase the line from the table APP_TMP_FVENDAS_WORK if exists in APP_TMP_FVENDAS?
thanks
|
|
|
|
|
|
|
|
Re: DELETE [message #359238 is a reply to message #359231] |
Fri, 14 November 2008 05:23   |
joicejohn
Messages: 327 Registered: March 2008 Location: India
|
Senior Member |
|
|
@oliveiraum,
oliveiraum wrote on Fri, 14 November 2008 16:16 |
But do i have to make a LOOP so that he cleans all lines from the table?
|
I do hope you meant "to delete all the records based on the condition you supplied". Anyways you don't need any loop for that.
However, if you want to delete all the records(i.e "empty your table") remove the WHERE CLAUSE and the conditions following from your DELETE Statement. i.e
Hope this helps.
Regards,
Jo
|
|
|
|
|
|
|
|