Sqlplus and conditional execution

I would like to write a sql script in which:
if there is a table TAB1
then compile a PROCEDURE
else exit without errors.
The script must be executed using SQL*Plus.
Can I do that?

Hi,
Yes, you can do that. It's not very elegant, however.
See this thread:
Re: Conditional Exit from the script

Similar Messages

  • Project-wide Debug flags and conditional execution

    I've programmed in literally dozens of languages, and an still relatively new to Objective-C and even some C programming techniques. In Perl, for example, I often create a module-wide or project wide debug flag which may be a single boolean true or false or may be a binary flag word with each bit designated for a particular section or protocol I'm working on.
    Then I only need to set the debug variable or flag once to enable a slew of debugging code or messages, and can easily turn them all on or just selected ones depending on the project.
    In the code I would use some combination of:
    $debug = -1;
    print "some text" if $debug;
    if ( $debug ) {
    print "some text";
    $debug_state = 1;
    $debug_files = 2;
    $debug_images = 4;
    $debug_all = 127;
    $debug = $debug_state & $debug_images;
    print "status: ", $status, " flags: ", flags, "
    " if ( $debug & $debug_state );
    Yes, this is all runtime based, and I can see where it may slow down a production program if the debugging code were inside code which was executed many many times in a short period, but I often will leave this kind of code in production versions for things that should not happen, so that if somehow it does happen due to data or hardware fault, a nice audit trail exists to follow.
    Yes, I know about NSLog and printf. The point here is whether to have to endlessly modify code with comment lines into active and dormant lines of code, or to build it once, and forget it except when it needs to be enabled, but it can be enabled without MODIFYING any code.
    How many times does// some code here
    other code
    become
    some code here
    / other code
    instead of
    some code here
    // other codewhen editing?
    My question is, is there some facility in Objective-C which already does this, either by library or framework? Also, I'd like to know how those of you who consider yourselves experienced in these kinds of things do the same in Objective-C or regular C, gcc, etc.

    reststop wrote:
    My question is, is there some facility in Objective-C which already does this, either by library or framework?
    The typical way to do this is via a macro that is defined only if a compile-time debug flag is defined. You don't have to change any code, but then the debug statements do not exist in release mode.
    You can keep the debug messages in your release code if you want to. The principle is the same. Instead of macros, use a global debug variable and a function. If the debug variable isn't set, the function just returns. If you are stickler about such things, you can create a singleton object.
    Another option is to use syslog functions and use LOG_DEBUG.

  • Apply MRU conditional execution

    Hi!
    I am using a tabular form and would like to update the rows (using ApplyMRU) only if two values in items P2_SUM_PLN and P2_FIKSNI_BR are equal.
    I have tried by adding a condition to the process but it seems that the process does not fetch the values of the items.
               e.g.  Value of Item / Column in Exp 1 = Exp 2   
    Exp 1 = P2_FIKSNI_BR
    Exp 2 = &P2_SUM_PLN.
    The same condition works as a Dynamic Action.
    The value of the number in P2_FIKSNI_BR is calculated via a SQL command, and the value of P2_SUM_PLN via a JavaScript.
    Can anyone help me with this?
    Thanks in advance!

    Hi,
    I am not sure what kind of "Conditional Execution" you are looking for.
    Syndication Server is based on the "Port" concept and we can associate an already saved Syndicator Map that also includes your Search criteria. So, the syndication server simply executes this map at a defined interval and places the file in the appropriate folder of the "Port". But, Syndication server cannot determine the map to be executed based on a condition and it also cannot determine search criteria within a map based on a condition.
    If your requirement is to execute a map based on a condition, I suggest you to use "Syndicator Batch" commands and use a program that triggers appropriate map based on this condition.
    Hope this helps,
    Regards,
    Rajani

  • Conditional execution of main DataTemplate

    Hi All,
    I am working on a Report in BI Publisher where the Data Model consists of three data sets of type-data template which are as below:
    1) Before Trigger
    2) Main DataTemplate
    3) After Trigger
    Now, I need to conditionally execute the main DataTemplate, depending on the return value of a function called in "Before Trigger". So, when function returns true, "Main DataTemplate" code is to be included in execution, and when it returns false we need only the code in "After Trigger" to be executed.
    Please guide me in achieving the above.
    Thanks
    Actual Problem- Elaborated:-
    In a report, first we need to check if the table used in code exists. In case it does, actual report is to be generated, and in case the table does not exist an error message is to be displayed as pdf output.
    To achieve this we have a function in "Before Trigger" that returns true/false based on table's existence. Now we need to execute the report code depending on the outcome of this function.
    For value = true, normal execution of report is to take place
    For value = false, code of main datatemplate needs to be bypassed, and flow to "After Trigger" so as to avoid BI Publisher error "table or view does not exist".
    The display of report/customised error message as output can be handled at the rtf level using sub-templates and if-else statements.
    Please let me know in case you need some other details from my end.

    Hi,
    I am not sure what kind of "Conditional Execution" you are looking for.
    Syndication Server is based on the "Port" concept and we can associate an already saved Syndicator Map that also includes your Search criteria. So, the syndication server simply executes this map at a defined interval and places the file in the appropriate folder of the "Port". But, Syndication server cannot determine the map to be executed based on a condition and it also cannot determine search criteria within a map based on a condition.
    If your requirement is to execute a map based on a condition, I suggest you to use "Syndicator Batch" commands and use a program that triggers appropriate map based on this condition.
    Hope this helps,
    Regards,
    Rajani

  • Conditional execution of syndication server

    I have a requirement for conditional execution of syndication server.  Is it possible to automate syndication server to run based on a predefined search and Map. I know we can do using syndication client but can we do the same using syndication server.  Thank you in advance.
    Regards
    Bala Pochareddy

    Hi,
    I am not sure what kind of "Conditional Execution" you are looking for.
    Syndication Server is based on the "Port" concept and we can associate an already saved Syndicator Map that also includes your Search criteria. So, the syndication server simply executes this map at a defined interval and places the file in the appropriate folder of the "Port". But, Syndication server cannot determine the map to be executed based on a condition and it also cannot determine search criteria within a map based on a condition.
    If your requirement is to execute a map based on a condition, I suggest you to use "Syndicator Batch" commands and use a program that triggers appropriate map based on this condition.
    Hope this helps,
    Regards,
    Rajani

  • I have purchased a movie and it has downloaded.   Next, I get a screen the says Terms and Conditions. It says to click Agree but I. Can not find Agree anywhere in the document.  how do I move forward and access the movie?

    I have purchased a movie and downloaded it. Next I get a screen that says Terms and Conditions and tells me to read and click on Agree. I cannot find the Agree anywhere in the document.  How do I move on and view the movie?

    Go to Settings>General>Usage. How much space does it show you have?
    If you connect your phone to your computer, what does iTunes say is on your phone? Do you see a large amount of "Other"? If so, you may have a corrupted database. You'll need to sync your phone then restore it as NEW (not from back up) then re-sync your data).

  • Terms and conditions not getting displayed on the last page

    Hi All,
    I have to display a smartform, on the front side of the page i have to display material details and on the back side of the page i have to display terms and conditions. I' am unable to print the material details and terms and conditions in duplex mode, but on the last page only material details are getting displayed, terms and conditions are not getting displayed.
    Can you please help me how to make the terms and conditions get printed on the back side of the last page.
    Thanks,

    I'm a bit confused by the statement "I' am unable to print the material details and terms and conditions in duplex mode".
    I suppose you meant to say "I am able to print the material details and terms and conditions in duplex mode", correct?
    If the problem is that on the last form page, the T&C is not getting printed on the back of the form, you could force the T&C page by using a flow logic command as the very last element of the main window, which gets processed when all the data is already output. For the command, use the 'Go to New Page' and specify the page name for the Terms & Conditions.
    In case this causes an issue that the last page is printed twice (since the T&C page is likely defined with the next page being NEXT_PAGE), then copy the already existing T&C page, call it LASTPAGE and leave the Next Page attribute empty.

  • Using multiple 'and' conditions in a SQL query

    Is it possible to reduce the SQL required to query using multiple 'and' conditions, e.g. I have a query like the following:
    select stat.personal_id, appt.username, appt.password, apps.rgn_apt_id, apps.apy_apn_id
    from apy_ast_application_status stat, rgn_usr_user appt, rgn_aps_applications apps
    where stat.apy_apn_id = apps.rgn_apt_id
    and apps.rgn_apt_id = appt.rgn_apt_id
    and stat.application_completed is null
    and stat.application_started_date > '01-MAY-11'
    and stat.amount_paid is null
    and stat.personal_details = 'C'
    and stat.further_details = 'C'
    and stat.education = 'C'
    and stat.employment = 'C'
    and stat.personal_statement = 'C'
    and stat.choices = 'C'
    and stat.reference = 'C'
    and stat.student_finance = 'C'
    Is there a way, to reduce all the multiple 'and' queries, to be read from say one line? If you know what I mean.......

    Ah, Ok this looks nice, thanks very much. It doesn't quite run as is because the stat.amount_paid query value is 'is null', while the others are 'C'. I tried amending the relevant line to various versions of the following:-
    in (select 'is null' 'C','C','C','C','C','C','C','C' from dual)
    which doesn't work.
    I can get the following to work so I am assuming that the it is not possible to use different query values within the brackets of the 'in (select....' statement?
    select stat.personal_id, appt.username, appt.password, apps.rgn_apt_id, apps.apy_apn_id
    from apy_ast_application_status stat, rgn_usr_user appt, rgn_aps_applications apps
    where stat.apy_apn_id = apps.rgn_apt_id
    and apps.rgn_apt_id = appt.rgn_apt_id
    and stat.application_completed is null
    and stat.application_started_date > '01-MAY-11'
    and stat.amount_paid is null
    and (stat.personal_details, stat.further_details, stat.education,
    stat.employment, stat.personal_statement, stat.choices, stat.reference, stat.student_finance)
    in (select 'C','C','C','C','C','C','C','C' from dual)
    Thanks for everybodys help - the suggested alternatives seem so much more elegant

  • I downloaded a movie from itunes on my ipad.  In the downloaded area where the movie should be, I only get a link to "iItunes Terms and Conditions", no movie.  There is nowhere to accept the terms and conditions.

    I downloaded a movie from itunes on my ipad. In the downloaded area where the movie should be, I only get a link to "iItunes Terms and Conditions", no movie. There is nowhere to accept the terms and condotions.

    Nevermind, the movie was there in the Videos app, not itunes downloads.  Thanks.

  • Since downloading the most recent version of iTunes, I have to accept the software terms and conditions every time I open iTunes

    Since installing the most recent version of iTunes, I have to accept the software terms and conditions every time I go in to iTunes.  I sign in to my account, but when I re-open iTunes, as well as having to accept the terms and conditions before continuing, I find that iTunes has logged me out of my account.  None of this has happened before.  I am using a PC with Windows 8.

    See Empty/corrupt iTunes library after upgrade/crash.
    tt2

  • New Icloud Terms and Conditions window pops up every time I try to check my email, or when I open setting. My email doesn't load because of this, so I haven't been able to check my email for months.

    'New Icloud Terms and Conditions' window pops up every time I try to check my email, or when I open setting. My email doesn't load because of this, so I haven't been able to check my email for months. When I click, 'view terms' it takes me to my Icloud section in settings, but the terms don't pop up. I plugged it into my iTunes to see if it would pop up, but that didn't work either. My phone is updated, and I'm pretty sure I already accepted the new terms and conditions on the last update a few months back.

    Hi munaxnight,
    If you are having issues with your iPhone continuing to ask you to accept terms and conditions, you may want to try some things to troubleshoot.
    First, quit all running applications and test again -
    Force an app to close in iOS
    Next, I would try restarting and if needed resetting the iPhone -
    Restart or reset your iPhone, iPad, or iPod touch
    If the issue is still present, you may want to restore the iPhone as a new device -
    How to erase your iOS device and then set it up as a new device or restore it from backups
    Thanks for using Apple Support Communities.
    Best,
    Brett L  

  • How to get the salesprice and condition for a customer / material / date

    Hi all,
    how can I get the correct price and condition for a customer / material / date ?
    I know this is possible using the BAPI_SALESORDER_SIMULATE, but this bapi is using to much ressources on the system.
    I'm trying to get the correct price and condition WITHOUT using that BAPI.
    Does anyone know how it is possible ? As said before : I have the customer, material and a date.
    thanks in advance for your help

    Hi
    You need it because it's possible to have a complex pricing procedure, and you can't do it with a simple select on a table. Think that you can have pricing requirements, formulas (ie: VOFM) and so on in your pricing procedure (tcode V/08).
    I hope this helps you
    Regards
    Eduardo

  • Ok so I updated to iOS 7 on my iPod (5th) it let me update my apps but I cannot download new apps thanks to the terms and conditions. Also my iTunes won't start it just blank, I tried everything I need help

    Ok so I updated to iOS 7 on my iPod (5th) it let me update my apps but I cannot download new apps thanks to the terms and conditions. Also my iTunes won't start it just blank, I tried everything I need help

       Did you download the new iTunes update that was also released this afternoon? That might be the problem. The new iTunes update came out today as well as the new iOS 7 update and if you haven't downloaded the new iTunes update it may be a compatibility problem so if you didn't, first update to the new iTunes and try again.

  • Why can't I download Textplus on my 4th generation iPod touch?  It's not jailbroke or anything but it says the terms and conditions have changed. When I agree, it says your session has times out. Try again. But it doesn't give me an option to try again an

    It's not jailbroke or anything but it says the terms and conditions have changed. When I agree, it says your session has times out. Try again. But it doesn't give me an option to try again and has a done button underneath it. I press done. The textplus app says "Waiting..." and is gray. What can I do to download this app?

    iTunes has to contact Apple to send your agreement to the new conditions, but your security software has to allow this contact. If blocked, you'll get a time out message. Follow the instructions here to check your security software settings: iTunes for Windows: Troubleshooting security software issues

  • TS1717 iTunes "Terms and Conditions Have Changed Before you can proceed you must accept the terms and conditions" is on an infinite loop.  No matter how many times I agree, when I go to update my apps the terms and conditions have changed link reappears.

    Can anyone help me?  Suddenly (i.e. just a few minutes ago) this problem has appeared.  I attempted to update two apps on my iPad.  The Terms and Conditions agreement comes up, I read the terms and conditions, I agree to them, I click AGREE, it disappears, I reclick on update and the Terms and Conditions agreement appears and we start the mobius strip all over again.  I tried to see if it was just on my iPad by trying to download a new app on my iPhone.  same problem.  Anyone have advice on how to resolve this issue?  Oh, and of course, Apple has declared my two new devices to be out of warranty and want me to pay to ask how to fix a problem caused by their own software.  Lovely.  so helpful.  Hey Cupertino ... are you paying attention?  I might start tweeting about this.

    I updated the software on my iphone4 tonight and ran into this same endless loop - "itunes terms & conditions have been changed" - go to itunes, aceept - back to the "T&C have been changed message" with no ability to do anything in the app store until I accepted the new terms.
    While not a very direct solution, I was able to finally accept the terms in a way that seem to register with apple by making a purchase through iTunes on my computer. This forced me through updating my payment information and updating my iTunes software to the latest edition (which I had not yet taken the time to do).  After doing both of these, iTunes took me through the terms & conditions on two separate pages, but ultimately allowed me to purchase my song.  Once I completed these steps, it fixed the problem on my phone, so now I can update my apps and download new ones without running into that loop.
    Hope this helps!!!

Maybe you are looking for

  • Log and capture freezes - please help

    hi, I'm using FCP 5 (studio). on G5 dual 2GH 1GB. it has become a nightmare to log and capture. after few minutes from working with log and capture the applications freezes. I have to force quit FCP. I trashed the preferences once, I re-installed, bu

  • Problem while releasing a transport request to Quality for BADI

    Hi i have implemeted a BADI for ME21N User exit. I have transported the BADI to Quality. It is giving an syntax error. But iam not getting any error message in Development.

  • 8820 v4.5 update failed and now nothing

    I used the online system software update utility didn't everything right, rebooted my computer and now my 8820 does nothing but flash 2 red pulses.  Can't turn it on, won't connect to my computer.  Please help!!!

  • Business objects and start events required for CO11N and CO13 transactions

    Hi, We do production order <b>confirmation</b> and <b>cancellation</b> in CO11N and CO13 respectively. Can somebody please tell me the corresponsing business objects and the start events for them? This is a very urgent issue, I will surely rewad good

  • ISE 1.3 Sponsor Appproval direct link

    There is a way to add a link in the email notification to the sponsor requesting approval. Does anyone know if there is a URL that is a direct link to the approval? Also is anyone aware of an API function for approvals so that approvals could be subm