Need help to convert SQL MSSQL statement to work with PL in ORACLE

Hi All,
I have the trigger below and it worked on MSSQL server for windown and
I really need your help to convert this trigger to work on PL/ORACLE:
create trigger deleteLD
     on tablea for delete
as
set nocount on
begin
     declare @tablename varchar(100)
     declare @dropSql varchar(50)
     select @tablename= dataset from deleted
     set @tablename = 'LD_' + @tablename
     set @tablename = @tablename + 'UTMSTATS'
     if exists (select * from sysobjects where name = @tablename)
     begin
          set @tablename = 'drop table ' + @tablename
          EXEC (@tablename)
     end
end
GO
Your help is greatly appreciated.
Thanks,
JP

not sure if this is something that you want:
Create Or Replace Trigger deleteLD
  Before Delete on tablea
Declare
  vCtr          number := 0;
Begin
select count(*)
   into vCtr
   from all_tables
  where table_name = :new.tablename;
if vCtr > 0 then
   dbms_utility.exec_ddl_statement('drop table '||:new.table_name);
end if;
End;note: not tested

Similar Messages

  • Need help getting my LaserJet 3390 scanner to work with my (iMac) Apple OS X version 10.9.4

    About two months ago i kept getting a message that my printer was not connected. When I got that fixed my scanner no longer worked and I haven't been able to find the settings to make it work. This is an excellent printer, in fine condition. Can someone please help?

    Hello dcguy,
    Welcome to the HP Support Forums!
    To get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial product. You can do this at Commercial LaserJet Forums.
    The support page for your product may be helpful in the meantime: HP LaserJet 3390 All-in-One Printer
    I hope this helps!
    JERENDS
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • I need help. My new iphone 4s was working with no errors for the past month. I was out one right and it was below 30 degrees. when i came in ny house it was about 75-80. I went to sleep and nothing was wrong with my iphone. I woke up and it won't turn on.

    If anyone could help?

    Hello dvf276
    Follow the steps in the article below to resolve issues with your iPhone not powering on.
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/ts3281
    Regards,
    -Norm G.

  • I need help in converting a pdf to a fillable form in my adobe

    I need help in converting a pdf to a fillable form in my adobe

    "Adobe" is a company. If you mean "Adobe Reader" then you can't (at least not easily). You need Adobe Acrobat for that.

  • Need help in converting numbers to Italian text

    Need help in converting numbers to text in Italian language. I want to knw is there any method other than SE63 to translate these text in one shot. I have tried with LSMW also (as the sheet is in XLS format ).Plz reply if anyone is aware of this ..

    hi,
    chk this code.
    CALL FUNCTION 'SPELL_AMOUNT'
    EXPORTING
    amount = amount
    currency = 'EUR'
    filler = ' '
    language = 'E'  => give the language as italian
    IMPORTING
    in_words = amountrs.
    rgds
    anver
    pls mark all hlpful answers

  • Need help in converting date format

    Hi,
    Need help in converting date format from 'DD-MON-YYYY' to 'YYYY-MM-DD' in an .rtf template as I believe xml publisher supports the date format as 'YYYY-MM-DD' only.
    Thanks,
    Raj.

    I got the same problem, anyone know how to solve this problem? I allready found some date functions on http://blogs.oracle.com/xmlpublisher/2008/09/date_functions.html . I also tried <?xdoxslt:month_name(xdoxslt:get_month(xdofx:substr(NEED_BY_DATE, 4,3)), $_XDOLOCALE), 0, 'nl-NL')?>, but then it returns a namespace error (Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'xdofx' used but not declared.). Anyone know how to fix this?
    Edited by: user11165753 on 7-dec-2009 23:50

  • I am new to this but need help. Lion and iCloud have never worked on my desk top or MacBook Pro.  Slow or Stop!  Is there any way to fix the problem?

    I am new to this but need help. Lion and iCloud have never worked on my desk top or MacBook Pro.  Slow or Stop!  Is there any way to fix the problem?

    We need more information. I'm not sure what you mean by both Lion and iCloud have never worked.

  • Needs help to know the different versions of forms with their compatibility

    Needs help to know the different versions of forms with their compatibility with different databases and operating systems.
    Kindly give the details or any suitable link for the same.
    please consider it as on urgent basis.
    regards,
    rajesh

    Rajesh,
    the certification matrix is available on metalink.oracle.com. You need a support contract to access this information.
    Frank

  • HT2480 I need help syncing my computer outlook email (through Yahoo) with my Iphone. when I delete an email on my computer is it still in my inbox on my phone.  Any help is appreciated.

    I need help syncing my computer outlook email (through Yahoo) with my iphone.  When I delete an email on my computer it is still in my inbox on my phone. Please help.

    Your computer is probably set up to access your Yahoo mail using POP3. POP3 does not synchronize with the server. For full synchronization, you will need to use IMAP instead. See the Yahoo mail help pages for instructions on how to configure your mail client.

  • Need Sceptre TV Remote Control code(s) that work with VZ P265v3RC -- the '335' code does NOT

    Recently upgraded my TV's in my house with new Sceptre 40" and 50" TV's - thank you WalMart. Purchased in September 2014. (new / current Sceptre TVs).
    All of the Verizon printed, online, and other documentation for the P265V3 RC (model RC2655005/01B) for Sceptre shows to use code '335'.   I have tried the '335' code on both of the TV's and no worky at all. 
    Following the 'Quick Setup Guide-Verizon FIOS remote' steps (paper/PDF instructions with RC Manual):
    I can successfully enter the '335' code as outlned in step 4... and 'The RED LED will blink twice and then stay on'. occurs.  So far, so good.
    Step 5 states, "5. Press and release the <CH +> button repeatedly until the TV turns off......."   This happens perfectly... I can press the <CH+>> button a few times, and indeed, my TV turns off.
    Now, onto Step 6: "Test that the remote control is programmed for your TV".....  can't get Mute, A/V, other keys to activate /. be recognized - even though I'm followijng "press and hold that key. Release it as soon as it works"
    Does anyone have a working code for Sceptre TV's ??? The Verizon '335' code doesn't work for me.
     I need the 'best code' anyone has found that works with new Sceptre TV's.... the 335 code that VZ recommends... no worky.

    Robertop,
    have you tried the following? The info below  is found here
    Turn on your TV and the FiOS TV Set-Top Box.
    Make sure you can see live TV.
    Press and hold the OK and FiOS TV buttons together then release both buttons.
    The red LED light blinks 2 times and then stays on.
    Press and hold the Play button.
    The remote control tries a new TV code every second.
    The red LED light blinks each time a new code is sent.
    When the TV turns off, release the Play button immediately.
    NOTE: Some TVs may respond slower than others. If necessary, you can press the Ch+ and Ch- buttons to go forward or backward one TV code at a time.
    Test your remote to ensure it is working properly:
    - Turn on the TV by pressing the TV button on your FiOS TV remote.
    - Press the Vol+ and Vol- buttons to ensure that you can control the volume.
    - Press the Mute and A/V buttons to ensure they work.
    If any of these buttons do not work, press and hold that button. Release the button as soon as it works.
    If all the buttons work, press OK to this TV remote code.
    The red LED light blinks 3 times and then turns off. Your remote control is now programmed.

  • Can SQL Developer Data Modeler work with OBIEE?

    Can SQL Developer Data Modeler work with OBIEE? Can we export the data model from the Data Modeler and import it into OBIEE? Or export the OBIEE metadata to the Data Modeler for Data Model defining?

    no
    Philip

  • Will file converting pdf file to excel work with Adobe Reader 10.1, Windows 7 platform?

    Will file converting pdf file to excel work with Adobe Reader 10.1, Windows 7 platform?  It shows that it is available for purchase but does it perform?  Will this work only with Reader XI?  Is the conversion done on-line?

    Moved to Adobe ExportPDF.
    The file is uploaded to the web for conversion. You can manually upload pdfs for conversion with your web browser and/or with Reader 10.1.

  • I successfully reinstalled iWork, then got a msg that I needed to contact developer to be sure it works with my version -- which is 10.7.4

    I successfully reinstalled iWork, then got a msg that I needed to contact developer to be sure it works with my version -- which is 10.7.4

    tHi, I'm getting there -- but want to check to be sure the "Run" button got the results expected:
    The last part of the  "Run" log says:
    ry to remove the apps bought from the Mac App Store :
    "<startupVolume>:Users:<userAccount>:Applications:Keynote.app "
    "<startupVolume>:Users:<userAccount>:Applications:Numbers.app "
    "<startupVolume>:Users:<userAccount>:Applications:Pages.app "
    set dossier_des_fichiers to path to applications folder from user domain as Unicode text
    set liste_de_fichiers to {"Keynote.app", "Numbers.app", "Pages.app"}
    tell application "System Events"
        repeat with un_fichier in liste_de_fichiers
            try
                delete disk item (dossier_des_fichiers & un_fichier)
            end try
        end repeat
    end tell
    --[/SCRIPT]
    --{code}
    Do you think "end try" and "end repeat" mean it was a successful undertaking?
    If not, could I use MacKeeper to perform the same function?
    I

  • Will the Google Docs app in the iTunes store work with my new iMac? Description states it works with the iPod, iPhone and iPad.

    Will the Google Docs app in the iTunes store work with my new iMac? Description states it works with the iPod, iPhone and iPad.

    There's iOS apps for iOS which is what iPods, iPads, and iPhones use.  Then there are Mac Apps (which is a different store) which is what run on a computer with OSX.

  • Need help in a sql statement

    Hi, I have some data like the following and I need to get only one row instead of two.
    Current data:
    ID                       Time_Type                       Time
    A_xyz Check_In 2009-02-11 07:00 AM
    A_xyz Check_out 2009-02-12 10:00 AM
    I want it in the following format:
    ID                       Check_in_Time                           Check_out_time
    A_xyz 2009-02-11 07:00 AM 2009-02-12 10:00 AM
    There are about 10 more fields in the table but all other data is same except for the time. Thanks for your help.

    Hi, Yes, I already had queries using max but then I found that I could not use them as I don't know how many time_types there would be. I appologize I should have mentioned this in my first post and had posted some additional info.
    In my example time_types are as check_in and check_out but infact the types are codes and they don't tell if they are check in or check out. All I need is to convert the rows into columns. I can call my columns col1, col2 etc instead of check_in_time and check_out_time.
    Also, I am giving you guys an example but it is exactly same as our real data.
    Thanks again.

Maybe you are looking for

  • I don't have a video signal on the TV by wathing a DVD via superdrive but have audio

    While watching a DVD running on my superdrive I get an audio signal via Apple TV but no picture (video). I am running the latest software versions. Any suggestions?

  • Drop box/ public

    I have inadvertently deleted or misplaced my drop box so that I can pick up stuff I am doing on my laptop and finish it downstairs on my IMAC. I did a permission verify and fix... but I am wondering where in the branch off files where should it be pl

  • IPhone sync with Calendars

    When syncing my iPhone 4S with iTunes, I've just recently started getting the following message: "iTunes could not sync calendars to the iPhone 'XXX' because the iPhone disconnected.  I've taken the following actions: 1.     connected the iPhone to a

  • How to add password to nokia 5230 mobile?

    Hello, I have recently bought my nokia 5230. But i dont know how to make my mobile password protected, without using any external software.  Please provide me the steps the do it. Thank you 

  • Lightroom2 File Path

    Using Lightroom2, I've created a catalog of scanned images of prints taken over the years. The prints are in folders by year starting at 1964 and ending when I switched over to digital. There is one additional folder titled "Unknown" in which resides