SQL * more: how string manipulation on the input parameter?

Hi people,

I will be grateful if you could help me create a sql (NOT a bash script!) script that uses a substring of the input parameter to a file name that will be rolled up into stuff.

example:

-sample.sql

which can be used as:

-$ sqlplus/nolog @sample.sql abcd_efgh

and the script works similar to the pseudo-code below:

"...

file_name = 'test_ ' | substr ("& 1 ', 6)

name of spool file

...

spool off

"

Thank you

Babak

Hello

I found a solution:

"

...

column new_value filename filename

Select "test_". filename substr('&1',6)

Double;

coil & filename

...

spool off

..."

Tags: Database

Similar Questions

  • The input parameter to pass between 2 maybe bounded task flows a whole list of table or table?

    Hello experts, Im a beginner to ADF dev, currently using Jdev / ADF 12 c.

    I need to move from a table or list of tables of the values of A bounded task flows to delimited the workflow B. How to do in this case, the use of an input parameter?

    I mentioned the following links which have had in the string values as an input parameter, and replaced related fields accordingly with the data type of table list, but it did not work:

    http://docs.Oracle.com/CD/E21764_01/Web.1111/b31974/taskflows_parameters.htm#ADFFD1689

    https://technology.AMIS.nl/2014/01/21/taskflow-InputParameters-explained/

    Oracle JDeveloper 12 c (12.1.2) tutorials - working with stubborn workflows, regions and routers

    The requirement of the business is such that I need 2 different workflow, where the workflow B must be in a popup with train component.

    I thought of using just a stream unique task bounded with pop-up windows on the pop-up windows... which is less elegant... y at - it smoother workaround?


    Thank you very much.

    Even though I know this isn't answering your question, let me stress the design element: in the ADF, view objects are intended to replace beans support / managed in ADF in detention is. It is one of the worst confusion with ADF + ADF BC, where people still use accompanying beans on the scope of the session/view/task flow to maintain user state. Instead of this, you must use display objects, the objects in view transition in case the data does not come directly form DB.

    To finally answer your question: you can pass any type of objects for workflow settings, just make your parameter of type java.lang.Object. Then you can convert it in turn, in the second task flow.

  • Try to get the input parameter of a web service Yanick based on the value of the table

    Hello-

    I am new to ADF and Jdev 11 g (I'm a developer of forms). I had created a web service from a db stored pl/sql package. I can run a function with a parameter of the ADF faces.

    Instead of the input being entrable user parameter, I want to be based on a selected value of ADF table column. How to correlate the value of the selected row in the column as an input function parameter?

    I played with an ADF output text based on the table column ADF PartialTriggers the value set for the ADF... table that updates the output text based on the selected column. Can I use some kind of partial trigger on the input parameter?

    From a point of view of forms, I am looking for ownership of "Copy Item value" :)

    Two options:
    Declarative in tab link, as shown here:
    http://blogs.Oracle.com/Shay/2009/07/java_class_data_control_and_ad.html
    (its a method POJO but should be the same for a Web Service invoke).

    Or via code in your backing bean:
    http://blogs.Oracle.com/Shay/2009/06/setting_parameter_value_for_bi.html

  • SQL more how to stop script after the exception of the DDL

    Hello

    I have script .sql, which I managed by SQL * more.

    Some migration of data and database structure changes were made in the script.

    So, I use a lot of distinct calls:

    @script_name.sql

    @script_name_1.sql

    @script_name_2.sql

    ...

    Some of the scripts contains DDL as create table or column.

    contains some declare blocks (DML).

    Is it possible to stop the script after an exception has occurred?

    Thank you, Olga.

    Hi, Olga.

    You can use the SQL * more order

    WHENEVER SQLERROR EXIT

    to tell SQL * more to stop the execution of orders and immediately disconnect after any exception SQL is triggered.

    I don't know of anyway to stay connected, but to stop script execution, after an error.

  • SQL * more: how to avoid asking them & 1?

    I use a parameter within a SQL Script more to set a value for the creation of different environments.
    DEFINE _env = '&1'
    The parameter & 1 is used. However, a NULL value is allowed. But if this parameter is not defined, sql * more guests to enter something for & 1. How can we avoid this?

    SQL use
    sqlplus user/password@database @test_parameter.sql
    
    SQL> exit
    
    Verbunden mit:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    
    "Geben Sie einen Wert f³r 1 ein:"
    
    SQL> prompt Env&_env.
    Env
    SQL>
    I'm looking for an easy way avoid the message < font color = "red" > "enter a value for 1:" < / police > if no parameter is added.
    If a parameter is added, this message does not appear.
    sqlplus user/password@database @test_parameter.sql _TST
    example script
    -- set environment 
    ------------------
    -- Allowed values are 
    -- "_DEV" = Development 
    -- "_TST" = Test
    -- "" = Production)
    set verify off
    
    DEFINE _env = '&1'
    
    begin 
      if '&_env' is null 
        or regexp_like ('&_env', '_[[:alnum:]]{3}') then 
         null; --ok
      else
        raise_application_error(-20000,'Parameter 1 (''&_env'') has wrong value. Must start with _ and only 3 letters or be empty.' );
      end if;
    end;
    /
    
    set echo on
    
    prompt env&_env.
    Published by: Sven w. March 15, 2012 16:40

    When you want to call it "parameterless" give a string empty (two single quotes) like this:

    sqlplus user/password@database @test_parameter.sql ''
    
  • How do I change the input on the LCD 65 profile Cisco

    We recently had a Cisco TelePresence given 65 profile system. We have all the documents and I could not find instructions on the lcd screen. The screen has several entries and RS232. I would like to know how to change the input to the screen. Could someone explain to me how it would happen? I guess its more rs232 because I can't find any button on the unit. Is there an API for the screen? What are the communication settings for the screen?

    Any help is appreciated more.

    Thank you

    James

    Double post - see https://supportforums.cisco.com/discussion/12742796/how-change-input-cisco-profile-65-lcd-screen

  • [Oracle] [ODBC SQL Server driver] String truncation on the right {01004} data

    When importing data from SQL Server 2005 to Oracle 11 g Release2 gateway, I get following error:

    insert into CSDescr select * from CSDescr@sqlserver
    *
    ERROR on line 1:
    ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:
    [Oracle] [ODBC SQL Server driver] string data, right truncation + {01004} +.
    ORA-02063: preceding 2 lines from SQLSERVER

    Oracle database characterset is AL32UTF8
    SQLServer database characterset is SQL_Latin1_General_CP1_CI_AS

    Here is the configuration file for the gateway settings:

    HS_KEEP_REMOTE_COLUMN_SIZE = LOCAL
    HS_NLS_LENGTH_SEMANTICS = CHAR

    I think that the definition of the parameter HS_LANGUAGE must correct the error, but I want to know what should be the value of this setting?

    HS_LANGUAGE must be set to a character set used by the foreign database

    Try: HS_LANGUAGE = american_america. WE8MSWIN1252
    Also specify HS_NLS_NCHAR = UCS2 nvarchars of SQl Server are stored in the UCS2 character set

  • How can I change the enable_row_shipping parameter in oracle11g?

    Here's my version of Oracle...

    Connected to:
    Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
    With the options of partitioning and Real Application Testing

    SQL > select * from v version $;

    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE Production 11.1.0.7.0
    AMT for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production

    SQL >

    I don't want to change the below the value of parameter of true to FASE. How to change this value? Since this is the hidden parameter.

    row_shipping Activate

    Concerning
    alter system set "_enable_row_shipping"=false;
    

    Perhaps with scope = spfile, test it.

    Why would you define it?

  • Workflow based on the input parameter

    I use JDev 11.1.1.6.

    I have an application that uses a workflow with 'ExecuteWithParams' to get the parameter from a URL and display the records on a page.

    I have it using a Bind Variable on the VO that corresponds to the InputParameter on the control ExecuteWithParams.
    What I would like to make is the flow to another page, depending on the parameter used in the URL.

    Example:

    If param in the URL is '? TEAM = 1 "then I go to the TEAM page and display records for TEAM 1.

    If param in the URL is '? REGION = 3 "then I would go to the REGION page and display records for REGION 3.

    Thank you
    Ray

    This could probably be resolved using a router activity or a custom default activity in the workflow method. Then from the method/router, can easily get to the desired activity of the TF based on an input parameter. For example if the parameter is route 'region' to executeRegionIteratorWithParams, which, in turn, can "go" to view displayRegions activity.

  • SQL * more: how to rest the password

    I'm trying to reset my password because I forgot... Currently, using SQL Plus 10.2.0.1.0

    Thank you

    Jason

    If the DB is in your laptop computer, call the sqlplus in the laptop itself and connect with / as sysdba. After which, you can reset the password of another user (for which you want to reset to the start) using

    alter user  identified by 
    

    Arun-

  • How to set programmatically the ' input length Max ' of a cell of the tree

    I want to specify a maximum length of N_MAX for names of cell of a tree, so that when the user press the F2 key to rename, it has failed to enter more characters N_MAX.

    For existing items in the file of the uir, I am able to get this behavior by setting the tree Edit > edit columns/cells > change cell > entry length Max to 5 (see attached img03.png).

    When the user tries to rename this article, he has failed to enter more than 5 characters (see attached img02.png).

    But how to set this attribute for items added programmatically (for example, through InsertTreeItem ()).

    I was not able to find the right attribute, because the attribute of cells ATTR_LABEL_TEXT_LENGTH (which seems more or less what I'm looking for) is "not definable.

    You have found an omission in documentation. You can use ATTR_MAX_ENTRY_LENGTH and ATTR_MAX_ENTRY_CHARS with SetTreeCellAttribute and SetTreeItemAttribute to set the max entry for a cell of the tree.

    Please report to us this and sorry for the inconvenience.

  • Lost my serial number for student, edition I m not a student more - how can I get the number?

    Hello!

    I bought my edition student of Adobe CS Design Premium 5.5 in December 2011 and recently reinstalled my laptop forget out before serial number. I still have the invoice with this purchase "Unimall GmbH" (which does not have its business more and thus couldn t help me) and the box of the product with the code produced on this subject. It s is not possible for me to follow the normal procedure, because I m not a student anymore and, therefore, canĀ“t download a registration certificate.

    How can I get my serial number now?

    Thanks in advance for your help and best regards

    Andrea

    contact your school and check your account, Adobe ID Code

  • How to dynamically change the image depend on the input parameter

    Hi all

    I have a running report depend on the particular organization, I have 15 operating unit and 15 different logo for each operating unit.

    How to change the Logo depend dynamically on the entrance past the user.

    If I have three or four logo I can add to my disposal help if another statement and his works fine but I have more than 10 logos so it was not possible to keep these in my RTF model.

    Is it possible to change the logo according to the entry without keeping this model.

    I saw this link but its not very well

    http://erpschools.com/articles/display-and-change-images-dynamically-in-XML-Publisher

    Concerning
    Srikkanth.M

    Can u send me the files?

  • How to change a region title based on the input parameter?

    Hi all

    I need to change the title of the dynamic region based on the value of a selection list in another region.

    Can someone help me in this?

    Kind regards
    Santini.

    Hello

    You can use & P1_ITEM_NAME. (including the & and the.) the title of region - this string will be replaced by the value of the item page called P1_ITEM_NAME, then change the name according to your order of the day of the page

    Andy

  • How TEB can remember the input text value?

    Hi all

    I wanted to know if there is a way a published course may recall the text that has been typed in BER even after the re-opening of the course.

    Simply put: html course Open-> typed in TEB {Hello}-> exit course-> classes-> reopen TEB appears {Hello}.

    Best regards

    Mirza

    I don't think there is another way, unless an expert Javascript has a solution.

Maybe you are looking for

  • Need to navigate to a pdf file, view/print it.

    In accordance with the subject line, I browse a folder, open a pdf file, view it (no need to edit) and then print it on a wifi printer. If I need a 3rd party app to do this, then please suggest a slight. Thank you very much.

  • Satellite L40 - 18W - how to install XP on Vista

    Please someone explain to me step by step procedure to install XP over Vista.When I try to install the XP it shows error the hard drive cannot be detected. Please help me...

  • Cannot install / upgrade or remove the Lenovo Solution Center

    I am getting error during the installation/upgrade to level or during the withdrawal of the following lenovo Solution Center. I googled for error code & found links with windows install error issue. But my windows install is good work and could be ab

  • Switchable graphics in Windows 8?

    Hello (please forgive my English waste ). I recently bought and installed windows 8. The transition from Windows 7 to Windows 8 was smooth and relatively flawless, but I have a question: My computer (HP Pavilion dv6) has 2 graphics cards, one to save

  • Problem with Dimension 9200 DXP061

    When I started my computer today, the bootscreen looks weird, please see the fig, can someone tell me what happened? Thank you in advance.