How to pass whitespaces as parameters to sqlplus

Hi all,
does anyone of you know how to pass whitespaces as parameters to sqlplus?
I am struggeling with with problem for quite a while now.
I tried doing this the following way:
sqlplus mydb/mydb@mysid @mypath\myfile.sql param1 param2 ' ' param4 ' '
sqlplus mydb/mydb@mysid @mypath\myfile.sql param1 param2 " " param4 " "
sqlplus mydb/mydb@mysid @mypath\myfile.sql param1 param2 '\ ' param4 '\ '
but none of this is working. Any more ideas?
Thanks in advance!
Doug

Hi,
This could do it :[oracle@Nicosa-oel ~]$ cat script.sql
DEFINE myparam1 = "&1 ";
DEFINE myparam2 = "&2 ";
DEFINE myparam3 = "&3 ";
DEFINE myparam4 = "&4 ";
DEFINE myparam5 = "&5 ";
select '&myparam1.' c from dual
union all select '&myparam2.'  from dual
union all select '&myparam3.'  from dual
union all select '&myparam4.'  from dual
union all select '&myparam5.'  from dual;
undefine myparam1
undefine myparam2
undefine myparam3
undefine myparam4
undefine myparam5
[oracle@Nicosa-oel ~]$ sqlplus scott/TIGER
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jan 3 16:20:49 2012
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @l
Scott@my11g SQL>@script a " " c " " e
C
a
c
e

Similar Messages

  • How to pass selection screen parameters in text elements?

    how to pass selection screen parameters in text elements?

    don't you mean he other way around. Assign text-elements (selection texts) to select options?
    This you do in the menu where you can find text-elements, selection texts.
    menu Goto->text elements->selection texts.
    Edited by: Micky Oestreich on May 10, 2008 2:45 PM

  • How to pass context based parameters to subquery?

    Hello to All!
    How to pass context based parameters to subquery of custom folder when I schedule workbook?
    Thanks, Oleg

    Hi Russ
    Yes, I've done this too. Basic SQL though will not allow the updating of a table inside a function, so we have to get clever. The trick is to use the PRAGMA AUTONOMOUS TRANSACTION command. Here's an example:
    FUNCTION UPDATE_MYTABLE(P_VALUE IN NUMBER)
    RETURN VARCHAR2 IS
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    UPDATE SCHEMA_OWNER.MY_TABLE SET MY_VALUE = P_VALUE;
    COMMIT;
    RETURN('Done');
    END UPDATE_TABLE;
    When the update has been completed the Discoverer worksheet will respond with 'Done'.
    Everyone: don't forget to grant EXECUTE on this function to all of the necessary users, including the EUL owner, and also don't forget to import the function using the Admin edition so that it is available for the users. You will also need to make sure that all necessary users have been granted the UPDATE privilege on the table.
    I hope this helps
    Regards
    Michael

  • How to pass XMLType as parameters to Java stored procs ?

    How to pass XMLType as parameters to Java stored procs ?
    ORA-00932: inconsistent datatypes: expected an IN argument at position 1 that is an instance of an Oracle type convertible to an instance of a user defined Java class got an Oracle type that could not be converted to a java class
    Java stored proc -->
    CREATE or replace FUNCTION testJavaStoredProcMerge( entity xmltype,event xmltype ) RETURN VARCHAR2 AS LANGUAGE JAVA
    NAME 'XDBMergeOp.merge(org.w3c.dom.Document,org.w3c.dom.Document) return java.lang.String';
    PL/SQL -->
    declare
    theQuote VARCHAR2(50);
    entity xmltype;
    event xmltype;
    begin
    entity := xmltype('<Quote><Fields><Field1>f1</Field1></Fields></Quote>');
    event := xmltype('<Quote><Fields><Field2>f2</Field2></Fields></Quote>');
    theQuote := testJavaStoredProcMerge(entity,event);
    dbms_output.put_line(theQuote);
    end;
    Java class -->
    public class XDBMergeOp {
    public static String merge(Document entity, Document event) throws Exception {
    return ...
    Thanks in advance.

    I think you'll need to use XMLType and then extract the DOM inside java..
    create or replace package SAXLOADER
    as
      procedure LOAD(P_PARAMETERS XMLTYPE, P_DATASOURCE BFILE);
    end;
    create or replace package body SAXLOADER
    as
    procedure LOAD(P_PARAMETERS XMLTYPE, P_DATASOURCE BFILE)
    AS
    LANGUAGE JAVA
    NAME 'com.oracle.st.xmldb.pm.saxLoader.SaxProcessor.saxLoader ( oracle.xdb.XMLType, oracle.sql.BFILE)';
    end;
      public static void saxLoader(XMLType parameterSettings, BFILE dataSource)
      throws Exception {
        Document parameters = parameterSettings.getDocument();
        SaxProcessor app = new SaxProcessor(parameters);
        app.processXMLFile(dataSource);
      Edited by: mdrake on Apr 6, 2009 11:28 AM

  • How to pass the report parameters through java not by using URL

    Hello...
    I have an oracle App. Server 10g with report service
    I can the report using the URL :
    http://host:Port/rwservlet/report=....
    and passing the report parameters ...
    But is there any way to call the report by pdf format and passing the parameters from java without using the url ???

    thank you shahcsanjay for your reply
    but I think that web.showDocument can not be used by ordinary java web application ..
    I think it can be used only with with "oracle forms" Am I right ?
    If no can you please tell me where can I find a useful document about how to use web.showDocument ...
    thanks again
    Saleem

  • How to pass selection screen parameters to a BEx IView?

    Hi Experts,
    I have added BI Reports in EP and I want to pass the default input parameters to the BI IView as soon as its accessed in EP.
    Can some one tell me how can I achieve this? Is there a way to pass the input parameters in the "Application Parameters" property of the BEx Iview?
    Regards,
    Shobhit

    don't you mean he other way around. Assign text-elements (selection texts) to select options?
    This you do in the menu where you can find text-elements, selection texts.
    menu Goto->text elements->selection texts.
    Edited by: Micky Oestreich on May 10, 2008 2:45 PM

  • How to pass APEX_UTIL.COUNT_CLICK parameters in the url

    Hello,
    I have to count clicks on the List items:
    There is a Click Counting option in the definition of each List item,
    and you can add Click Count Category there.
    However, I also need to add Click Id parameter - p_id.
    This parameter (p_id) suppose to pass a value into CLICK_ID column of the APEX_WORKSPACE_CLICKS view.
    I am constructing a url for that.
    The url without p_id works perfect:
    z?p_url=f?p=&APP_ID.:43:&APP_SESSION.::NO:::&p_cat=Common&p_company=&WORKSPACE_ID.&p_user=&APP_USER.But the url with p_id does not work at all:
    z?p_url=f?p=&APP_ID.:43:&APP_SESSION.::NO:::&p_cat=Common&p_id=Profile&p_company=&WORKSPACE_ID.&p_user=&APP_USER.Do you know how to pass p_id parameter in the url, so that it would be inserted in apex_workspace_clicks view?
    Thank you!

    CLICK_ID column of the APEX_WORKSPACE_CLICKS is a Number, so you have to pass a number, ex:
    &p_id=1
    So your url should look like:
    z?p_url=f?p=&APP_ID.:43:&APP_SESSION.::NO:::&p_cat=Common&p_id=1&p_company=&WORKSPACE_ID.&p_user=&APP_USER.You can use a page number to associate with a click, to be more descriptive

  • How to pass command line parameters During server start up

    Hi,
      I am trying to use Net Beans profiling tool.On the server side i required to pass a command line option to enable remote profiling.
    Regards,
    Kiran.

    Hi, MB.
    If you are talking about the automatic Java Web Start support for launching app clients in GlassFish, you can pass the equivalent of command line arguments using the query string of the URL you use to launch the app client.
    Briefly, use
    http://host:port/client-path?arg=first-arg&arg=second-arg& ...
    specifying the argument values in the order that you want them passed to the client.
    The GlassFish server will do the right thing and generates the correct JNLP so your arguments are passed to the app client.
    The GlassFish developer's guide http://glassfish.dev.java.net/nonav/javaee5/docs/AS91DG.pdf discusses this and all aspects of the Java Web Start support. You can also take a look at this blog entry http://blogs.sun.com/quinn/entry/command_line_arguments_and_properties that focuses on how to pass arguments.
    Since this technique deals with argument passing in the URL, it works no matter how you launch the app client: a URL in a browser, the javaws command, etc.
    - Tim

  • How to pass background event parameters to ABAP program in SM36

    Hi team,
         I want to pass background event parameters to ABAP program on job scheduling in SM36. For example, Background jobs will trigger, once background event triggered from Non-SAP system using SAPEVT command with parameters.
         I want to pass the event parameter values to the ABAP program . Can you please help me on this.
    Regards,
    Anand Krishnan

    Hi,
    Which ABAP program - the one that will be executed as a job step? If yes, I don't believe you can "pass" something to it because it will be started by "job starter" of SAP background processing run-time system. The ABAP program executed in background can, however, get the job run-time information using FM GET_JOB_RUNTIME_INFO, which also returns EVENTID and EVENTPARM. Is that the event parameters you were looking for?
    cheers
    Jānis

  • How to pass my input parameters (duty and frequency) to other loop?

    Hi everyone..
    Can you help me in doing my project..I have a problem regarding passing my two parameters (duty and frequency)
    from my main while loop passed to PWM program (other while loop).
    As for your reference, attached with my VI project.
    Hope to read your response guys!
    thanks and regards,
    Ludz
    Attachments:
    Project VI (zipped) Folder.zip ‏1528 KB

    See the attached VI and tell me the result..
    Attachments:
    Project VI (zipped) Folder.7z ‏411 KB

  • How to pass dates as parameters in GO URL?

    Hi,
    Can we pass date values as parameters in GO URL?
    I have a date column in my source report that I would like to pass as filter parameter to target reports via GO URL. Could you please let me know the correct syntax if this is possible?

    How can i convert the CHAr to date in the target?? I am using the below syntax and it is receiving a value of 20-JUL-2011.
    '<a href="http://sunt2000-10.wfs.com:9704/analytics/saw.dll?GO&path=/shared/WFS%20Financials/WFS%20Business%20Aviation/WFS%20Business%20Aviation%20Retail%20Volume&Action=Navigate&P0=1&P1=eq&P2="WFS%20Day%20Date"."Calendar%20Date"&P3=' || CAST("WFS Day Date"."Calendar Date" AS CHAR)  || ' ">QTY(USG)</a>'
    I need to convert this as a DATE when navigating to a different page to pass as a parameter.

  • How to pass the import parameters in FM alsm_excel_to_internal_table

    I have an openoffice excel file.Even if I store as an xls file the FM is not working

    Hi,
    You can do like:
    TYPE-POOLS truxs.
    DATA: it_raw TYPE truxs_t_text_data.
    *      internal table declared to be passed in the
    *      function module used to convert data from xls to sap
    *&At selection screen
      SELECTION-SCREEN BEGIN OF BLOCK b2  WITH FRAME TITLE text-004.
    * parameter declared to browse file from presentation server
      PARAMETERS : p_file TYPE rlgrap-filename OBLIGATORY .
      SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    *& Subroutine created to put F4 functionality on the selection screen
    *& for the user to browse the file from the presentation server
      PERFORM f4_file_process USING p_file.
    START-OF-SELECTION.
    *&Function module called to upload xls data into an internal table
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_field_seperator    = 'X'
          i_line_header        = 'X'
          i_tab_raw_data       = it_raw
          i_filename           = p_file                 "file path browsed
        TABLES
          i_tab_converted_data = it_upload[]            "int table populated having fields same as uploaded file
        EXCEPTIONS
          conversion_failed    = 1                      "browsed file's data
          OTHERS               = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    FORM f4_file_process  USING    p_p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = 'P_FILE'
        IMPORTING
          file_name     = p_p_file.
      IF sy-subrc NE 0.
        MESSAGE e000(zsd).
      ENDIF.
    ENDFORM.                    " F4_FILE_PROCESS
    Hope it helps
    Regards
    Mansi

  • How to pass BI Query parameters from Function Module

    Hi,
    We are executing the BI queries using the Function Module "RS_VC_GET_QUERY_VIEW_DATA_FLAT" by passing the query name and the provider information.
    Is there a way, to pass the filter parameter values also to the query by using this function module? I am not sure how the VC  tool is using this Function Module to call the BI queries and passing the filter values.
    Your help is appreciated.
    Thanks
    Suri

    Suryanarayana,
    Are you trying to execute a query in batch?. If you want to execute try to look at WRITEQUERY - which is a standard SAP program. You can execute this program directly or you can customize it completely and produce the output in .CSV file.
    Hope this helps. Award points if useful.
    Goodluck,
    Alex (Arthur Samson)

  • How to pass multi-value parameters to DDS (data driven subscription)?

    Using RS2005, how should multivalue parameters be stored in a database field so that a data driven subscription can properly read and use them?  I have so far had no luck using syntax of:
    1)  parm1, parm2
    2)  parm1,parm2
    Do single qutoes need to explicitly wrap the values?  Can you please provide an example and a SQL INSERT statement using parm1 and parm2 to demonstrate what to store in the database field? 
    Thanks!!

    I have skimmed through this an have ran into this problem before but not with RS specifically, but with other ASP.NET apps I have built.  Maybe this work around will help.
    In my database I created a table function I call udf_Split List.  It looks like this: (Can't remember where I got this from, but it's not my own.)
    CREATE
    FUNCTION [dbo].[udf_SplitList]
    @List
    varchar(max),
    @SplitOn
    nvarchar(5)
    RETURNS
    @RtnValue table
    Id
    int
    identity(1,1),
    Value
    nvarchar(100)
    AS
    BEGIN
    While
    (Charindex(@SplitOn,
    @List)
    > 0)
    Begin
    Insert
    Into @RtnValue
    (value)
    Select Value
    =
    ltrim(rtrim(Substring(@List,
    1,
    Charindex(@SplitOn,
    @List)
    - 1)))
    Set @List
    =
    Substring(@List,Charindex(@SplitOn,
    @List)
    +
    len(@SplitOn),
    len(@List))
    End
    Insert
    Into @RtnValue
    (Value)
    Select Value
    =
    ltrim(rtrim(@List))
    Return
    END
    Then, in my query I used the following parameter: QueriedField IN(select value from dbo.udf_SplitList(@Parameter,',')  (I used commas to separate the list, but you can use whatever you like (;,|,*, etc.)
    For you @Parameter would be your DDS list parameter.  Hope this helps.  You can enter your list like Item1,Item2,Item3 etc.

  • How OSB pass Initial Context parameters to EJB

    For security reasons I have to pass a ticket (through initial context) to legacy system from OSB for calling EJB, below is a code
    Hashtable env = new Hashtable(2);
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, connectionUrl);
    env.put(javax.naming.Context.SECURITY_PRINCIPAL, ticket);
    env.put(javax.naming.Context.SECURITY_CREDENTIALS, "");
    InitialContext ctx = new InitialContext(env);
    Object homeRef = ctx.lookup("com.cih.services.contact.interfaces.IContactServiceRemote");
    IContactServiceRemoteHome home = (IContactServiceRemoteHome) javax.rmi.PortableRemoteObject
    .narrow(homeRef, IContactServiceRemoteHome.class);
    IContactServiceRemote ejb = home.create();
    Please let me know how we can pass Initial context parameter from Business service or proxy service to legacy system.
    Thanks

    Hi Russ
    Yes, I've done this too. Basic SQL though will not allow the updating of a table inside a function, so we have to get clever. The trick is to use the PRAGMA AUTONOMOUS TRANSACTION command. Here's an example:
    FUNCTION UPDATE_MYTABLE(P_VALUE IN NUMBER)
    RETURN VARCHAR2 IS
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    UPDATE SCHEMA_OWNER.MY_TABLE SET MY_VALUE = P_VALUE;
    COMMIT;
    RETURN('Done');
    END UPDATE_TABLE;
    When the update has been completed the Discoverer worksheet will respond with 'Done'.
    Everyone: don't forget to grant EXECUTE on this function to all of the necessary users, including the EUL owner, and also don't forget to import the function using the Admin edition so that it is available for the users. You will also need to make sure that all necessary users have been granted the UPDATE privilege on the table.
    I hope this helps
    Regards
    Michael

Maybe you are looking for

  • Mid-2011 MacBook Air Crashed When Unplugging Thunderbolt

    I am using the Belkin Thunderbolt Express dock. I have found that if I am running my Macbook Air off of the battery and unplug the Belkin dock, my Air crashes. Has anyone else had any issues with their Macbook crashing when dicsonnecting a Thunderbol

  • Why is my hard drive clicking?

    i have a parrallels desktop installed on my mac. every time im using parallels theres a clicking noise coming from my hard drive. Why???

  • Problem in FM

    Hi, I have created a Function Module, and from the function module i am calling a report program thru "SUBMIT" command. now in the 'submit' command i add the addition 'exporting list to memory and return'. after that i read the contents of the list u

  • User Authentication in ADF BC

    Hi, I am trying to understand "how to authenticate the database(or application) user and retain the connection for later pages in ADF BC application". I downloaded the famous SRDEMO from oracle and now working on it. As I understand : It runs the ind

  • How do I get podcasts to play continuously?

    I just switched from using an iPod touch to an iPad, and now I can only play one podcast at a time.  I used to be able to play the first one and have it play all of them. It also used to mark which episodes I had already listened to, but not now. Is