Only run script if required by input

I'm trying to setup a sql script that runs various other scripts from within. A number of these scripts will only need to be run if the user requires them to be. I've tried similar to the following, to no avail:
ACCEPT run_scripts PROMPT 'Are extra scripts required? default (N):' DEFAULT N
@@script1
@@script2
BEGIN
  IF &&run_scripts = 'Y'
  THEN
    @@script3
    @@script4
  END IF;
END;
/Is there a way of achieving this? Thanks.

Hi,
SQL*Plus wasn't designed for that, but you can do it, using substitution variables.
Have the users run main_script.sql, which looks like this
--            This is main_script.sql
ACCEPT run_scripts PROMPT 'Are extra scripts required? default (N):' DEFAULT N
@@script1
@@script2
COLUMN     new_script_col     NEW_VALUE     next_script
SELECT     CASE
         WHEN  '&run_scripts' = 'Y'
         THEN  'extra_scripts'
         ELSE  'goodbye'
     END     AS next_script_col
FROM     dual;
@@next_scriptThis will call either one of two other scripts: extra_scripts.sql or goodbye.sql
Extra scripts.sql can be:
--     This is extra_scripts.sql
@@script3
@@script4and goodbye.sql can be
--     This is goodbye.sql
PROMPT     This concludes the job.goodbye.sql can also be empty; it dioesn't actually have to do anything at all, even print a message.

Similar Messages

  • Script Alert "You should only run scripts from a trusted source."

    I created a small javascript which opens Photoshop and resizes some images.
    I want to be able to double-click the .JSX file from Windows Explorer, and have Photoshop execute the script. Likewise, I want to be able to run the .JSX file from the command line.
    The script runs perfectly. However, the problem is that I don't want any user interaction. I want to be able to run the script from the command line without the user having to click anything. What happens now when I try to run the file from Windows Explorer of the command line is, I get a Script Alert with the following text:
    You are about to run a script in Adobe Photoshop CS3. You should only run scripts from a trusted source. Do you want to run the script? Yes/No
    Is there any possible way to bypass this message or to answer in the affirmative?
    Thanks,
    Jamie L.

    Hi... Sorry to revive such an old thread,
        Does anyone know the "trusted source" folder for MAC CS4.
    EDIT!
    My bad.  "The /users/<user_name>/documents/Adobe Scripts" folder is working for this purpose for me.  I needed a path to it and forgot that the ~ resolves to the current user.  Sweet.
    -Bill

  • I am wanting in input audio to a MacBook Pro  running 10.9.4.  Since there is only the internal microphone as an input choice, how do I accomplish this?

    I am wanting in input audio to a MacBook Pro  running 10.9.4.  Since there is only the internal microphone as an input choice, how do I accomplish this?

    Not something I've ever done, but I found a 9-year-old article from MacWorld -> http://www.macworld.com/article/1041790/tapetocd.html - that explains it a bit. Apparently the only software that you need is GarageBand and a hardware interface. Just Google "copy audio cassette to mac" and you'll get tons of hits.
    Good luck,
    Clinton
    MacBook Pro (15-inch Late 2011), OS Mavericks 10.9.4, 16GB Crucial RAM, Crucial M500 960GB SSD, 27” Apple Thunderbolt Display

  • I keep getting message "This page requires a plugin that can only run in 32 bit mode" what does this mean and how can I fix it?

    I keep getting message "This page requires a plugin that can only run in 32 bit mode" what does this mean and how can I fix it? It seems to come up randomly, but I'm fairly ignorant.

    Previous versions of Firefox were only 32 bit, Firefox 4 for the Mac contains 32 and 64 bit versions. If you want to always start Firefox in 32 bit mode, open up Finder and go to the Applications folder. Control-click the Firefox app and click "Get Info", then select the "Open in 32-bit mode" option.

  • Error message says "This page requires a plugin that can only run in 32-bit mode"

    When I try to write an email from my BT site I get the following message
    "This page requires a plugin that can only run in 32-bit mode"
    Then there's a link to restart the page in 32-bit mode. However, it resets to whole page, drags things back out the trash.
    I have only had this problem since updating to the latest Firefox

    Previous versions of Firefox were only 32 bit, Firefox 4 for the Mac contains 32 and 64 bit versions. If you want to always start Firefox in 32 bit mode, open up Finder and go to the Applications folder. Control-click the Firefox app and click "Get Info", then select the "Open in 32-bit mode" option.

  • Running scripts concurrently from various workstations(OTM)

    We have a server setup for OATS and we are accessing the OTM given by admins. But when when we submit the scripts from workstation the playback is running on server not on workstation.
    what setup is required on workstations to see the script playback on workstation only when run from OTM. I have 5 workstions where I need to run scripts concurrently.
    We are using OATS 12.2 and this is for Oracle EBS functional testing
    Thanks

    Hi,
    You have to add machines in OTM server. During execution, you have to give execution in client machine.
    Cheers,
    Deepu M

  • Can we run script logic at the time of preparing reports.

    Helo Everybody!
    I am new to SAP BPC.
    Can we run script logic at the time of preparing reports.
    Thanks & Regards,
    Satish.

    If you mean, "Can we run script logic at the time of preparing reports" is equivalent to entering data into the report and sending it to the database, then yes, you may run logic as Marcel indicates.  Defualt logic is ALWAYS run for ANY and EVERY set of data that is sent via an input template from the field.  You may also run logic when posting a jOURNAL entry as well.  But be careful....if default logic attempts to perform to MANY or COMPLEX calculations, the time it takes to complete the process may not be in expectations with the users plans.  There is a fine design balance required when planning to run logic at the time of input, as opposed to running in a package or at specific times during the day.
    Hope this helps.

  • Require email inputs the same on contact form

    Hi there folks,
    2 part question;
    I'm using Dreamweaver CS5, and have a couple of contact forms on my websites set up. They work fine, but lately have been inundated with spam. Mostly simple automated bots that waste my time. I don't want to install a captcha setup.
    I currently require people input their email address twice, in case they make a typo, and while both fields are required, it allows them to both contain different inputs; for example, email 1 might be [email protected] and the 2nd one might be www.spamlink.com .. etc. I think if they were required to be the same, it'd fix most of the problems.
    Here's part of my foms
    <form action="/xxx-example.pl" method="post" name="Image Inquiry" id="Image Inquiry">
    <input type="hidden" name="subject" value="My Site Print Form Order" />
    <input type="hidden" name="required" value="email,email 2,Client Name," />
    and then this
    <td align="left" valign="middle"><span class="Form">Your email:</span></td>
                          <td align="left" valign="middle"><input name="email" type="textbook" id="Client Email" size="20" maxlength="30" /></td>
                        </tr>
                        <tr align="left" valign="top">
                          <td align="left" valign="middle"><span class="Form">Re-enter email: </span> </td>
                          <td align="left" valign="middle"><input name="email 2" type="textbook" id="Client email 2" size="20" maxlength="30" /></td>
    What I want is to require the inputs in both of those fields be the same (and both be email addresses).
    Also, I'd like to have a simple question, such as "What is four plus five" where the user must input "9" for the form to go through. Or really anything where I require a specified input.
    I'm not a php person or javascript or anything, so if someone can help me get this working, I'll probably need very basic and specific info; anything else will lose me. I've tried different "honeypot" methods and nothing seems to work properly.
    Thanks so much
    Cheers
    Carl

    I didn't realize that validation had to be server side in the script,
    Validation can be done client side using javascript, but only in addition to server side. For example, you might want to use client side validation to alert the user to a mistake before they submit the form. But, you also must use server side validation as spammers will bypass any client side validation.
    How on earth do I find someone who can do that?
    You either need to find a web developer that knows perl (there are plenty) or find a php developer (lots of them) to redo your script in php.
    Another alternative is to use a product like formstogo (http://www.bebosoft.com/products/formstogo/overview/) which will create your script and probably has all of the validation features you want.

  • Require User Input for either dashboard prompts not BOTH ! !

    Fellow Earthlings,
    How to make required for user input for either of dashboard prompts not BOTH. !!!!!!
    Like if they enter '123' on DashP1 they need not have to enter DashP2 value and vice versa on same dashboard prompt.
    I have some dashboard prompts and I am using presentation variables to pass these values to my analysis.
    DashP1 - Pvar1 - Default All columns - User can type in values
    DashP2 - Pvar2 - Default All columns - User can type in values
    In my report , I am using a SQL filter to do a table.column_name LIKE (concat('@Pvar1}{'%')) same for the other table.column_name LIKE (concat('@Pvar2}{'%')) [ This is because users want to do a partial match on the value.
    So when the user is typing the values like 123 on DashP1 they are able to search, which is good. However on DashP2 which defaulted to all column values, they just erase/delete that and pass no value to it. So it remains the prompt vlaue is looking like -Select Value state which is not good. :(
    Now when there report is run for that DashP1 -value as '123' obviously we get no results since erasing that is causing it not to pass any value and when i check the query log it passes '@Pvar2'. This is causing no results.
    So I thought making it Required user input would resolve the issue, however the new request is to have either DashP1 or DashP2 require user input.
    Please advice if there a way to solve this problem.
    If this any way possible with Action links or any other methods.
    Any help is greatly appreciated.
    Thanks,
    VidyaS

    Hi Vidya, Please post that Script it will be quite handy for other OTN users.
    Thanks
    NK

  • Where can I get a copy of "Find My Friends" to load on a iPhone 4 that can only run iOS 7.0.2?

    The App "Find My Friends" in the app store is ver 4.0.1 which requires iOS 8.0.1.
    I wish to load onto an iPhone 4 that can only run iOS 7.1.2
    Where can I find a copy of "Find My Friends" ver 3 ?

    I believe I have found the answer myself ... but it might help other people with this and similar Apps.
    Apple has a work around for older devices.
    Download the latest app to your computer with iTunes.
    Then log into the store with your device and select purchased.
    Find the app(s) for iOS7 you downloaded to iTunes and then select install. If an older version (i.e. iOS6) is available it will download.
    Cheers!

  • Itunes cannot run because some required files are missing...vista 64 bit OS

    I'm running on a Vista 64 bit HP computer, and I have been trying to download itunes for the past couple days and all it says is Itunes cannot run because some required files are missing please reinstall itunes...I have no idea what to do...i have looked around the forums for information and I guess I'm not the only one having issues using a 64 bit OS. Btw the 64 bit Itunes won't work either. It does the same exact thing...

    all it says is Itunes cannot run because some required files are missing please reinstall itunes
    I'd like to check for malware with that message, Nico. (With modern versions of iTunes, if files really were missing, iTunes would be much more likely to do a repair install of itself when you wen't to launch it, rather than returning the old-fashioned files-are-missing message.
    Download and install the free version of MalwareBytes AntiMalware. Update your MBAM definitions and run a full scan of the PC. (Takes about 2 hours on My Lenovo.)
    http://www.malwarebytes.org/mbam.php
    After the scan completes, find the log file for the scan, and paste the contents of the log into a reply here.

  • Flash restricted running scripts or activeX controls

    Hey, can someone give me a hand?
    I read in a different, older forum, that said to use "<!--
    saved from url=(0014)about:internet -->" but how do i put it
    into my flash projects?
    If this is not what i should use then what should i use to
    remove the sign "flash restricted running scripts or activeX
    controls" that pops up when i run the flash on my website.

    I thought that only happened when running flash
    locally.

  • Running scripts in Aperture

    Aperture appears to have the facility to run scripts during the import stage (it's called 'Action' in the import pop up menu), but I'm having problems with it.
    I have successfully run the script below, and have exported the subsequent metadata to the master, which is my aim.
    But I cannot get the script run via this 'Actions' facility during import, even importing into a second library after the 'Object Name' field (called 'Title' by Aperture) has been created in the file and contains a 'space'.
    Can anyone show me what I am doing wrong?
    I found the script at: How can I set the Object Name to the file name on import?
    The post reads:
    AppleScript to the rescue!
    1. Copy the following text into Script Editor:
    tell application "Aperture"
    set selectedImages to the selection
    set tName to name of item 1 of selectedImages
    repeat with i from 1 to number of items in selectedImages
    set this_item to item i of selectedImages
    set tName to name of this_item
    set value of IPTC tag "ObjectName" of this_item to tName
    end repeat
    end tell
    2. Save the script in a sensible place, such as ~/Library/Scripts/Aperture Scripts so that it will turn up in the Script Menu (if it's enabled).
    3. Select a bunch of images in Aperture.
    4. IMPORTANT! You must use Batch Change to put a value into the Object Name tag (such as " "), until you do so the tag doesn't exist for those images and therefore cannot be altered.
    5. Run the AppleScript, it should loop through all the selected versions and put the version name into the Object Name tag.
    Note - the Master File Name isn't accessible via AppleScript, only the Version Name.
    Ian
    P.S. As with all such scripts, test it on a small number of 'spare' versions before doing anything drastic...
    Help!

    I haven't. Have you tried making a droplet to run at the end of the LR export?

  • Running scripts in different schema

    Assume you have a workspace user DEMO and parsing schema TEST and PROD.
    I create from Workshop/utilities/DDL you select schema PROD for getting DDL for tables, Triggers...
    Now you want to run this script against schema PROD (to create the Objects from PROD at TEST). But at Workshop/scripts you see the scripts owned by TEST, but you can't select a schema fur running the script.
    As workaround I edited the script: create table TEST.x instead of create table x, but I got: ORA-01031: insufficient privileges.
    If I go to Workshop/SQL_Commands select the schema TEST and put in the content of the script (create table TEST.x) it works.
    I confused as I create a DDL for y selecting TEST as schema and want run it as "create table PROD.y" - IT WORKS.
    In which context is a script executed ?
    The difference between schema TEST and PROD is that PROD was created with the workspace and TEST was added later (as new created schema).
    It looks like a bug?

    thank you scott, I understand. I assumed/found the "primary" schema (b) as the way as it worked. The default schema (a) I now tested - it works.
    That means per user there is only 1 schema assigned for running scripts (default or the first schema sssigned to workspace.
    But If I have a workspaced with assigned many schemata and some users, having there own default schema but accessing different schemata, there is no way to run a script at a specific schema.
    A workaround could by if a developer can change his default schema, but he can't
    ( I believe thats okay!).
    A developer sometimes has to create, upload,execute scripts ...
    For my example with schemata DEMO, PROD,TEST I hade to create 3 developers and relogin for executing scripts in the 3 different schemata.
    I think there is an enhancement request for having
    a) connect command in a script OR
    b) selecting schema as in object browser
    Thanks - hope you had merry christmas

  • Loading script "script path-name" failed (0xC0000006) error when running scripts from DFS

    We have this issue where any number of random scripts that execute at startup will produce the following error when run from DFS:
    The status code for this error equates to STATUS_IN_PAGE_ERROR - The instruction at 0x%p referenced memory at 0x%p. The required data was not placed into memory because of an I/O error status of 0x%x.
    This does not always happen each time and the script can be random. If we move the script(s) to a non DFS, we do not see this. I believe the issue is being caused by a minute disconnect to the DFS for whatever script is attempting to execute at that
    moment. This happens across a few (consistent) offices on different computers.
    Any ideas?

    Hi,
    According to your description, my understanding is that you run scripts in a shared folder which is added to a DFS Namespace, then the error prompt. However, you can run the scripts when you directly access the shared folder.
    What scripts did you run? Is there any error message in the Event Log? If so, please provide us the detailed error message for our further research.
    Best Regards,
    Mandy 
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

Maybe you are looking for

  • Error while configuring SAP authentication in CMC

    Hi, I am trying to set up SAP authentication in CMC to a SAPBI system to which I am able to connect successfully in Designer and Voyager. I have the SAP Integration KIT also installed. As a first step I created Entitlement and then filled up the opti

  • Actual Price

    HEllo all, I want to know that if  i do the costing run then it is the standard cost which includes BoM and activity costs After monthend when i release the standard cost then it becomes actual i understand about the Bom cost but how the activity pri

  • ? getColumnName()

    I can't figure out why the column names are not showing up on my table. Here is the code. package mytablemain; import javax.swing.table.AbstractTableModel; import java.util.List; import java.util.ArrayList; class MyTableModel extends AbstractTableMod

  • How do i find out what is backed up to my internal hard drive

    i backed up all my movies to an external hard drive to save space on my macbook air but when looking at the storeage space i see that there is still alot of space taken up from backups.  I have time machine set up so my macbook backups to my external

  • I know I can install creative cloud in 2 computers.

    Can I use the programs at the same time? I hope you can help me