SQLPLUS: define variable with multiple lines

Hi All,
I need define a varaible with multiple lines as following:
define schema_name = 'aaa',
'bbb',
'ccc';
select * from tb_test where sName in &schema_name;
However, it seems SQLPLUS dose not like the way I define the variable. What I want to do is to select * from tb_test where sName in ('aaa', 'bbb', 'ccc'). I would like to use multiple lines in the define.  Any suggestion?
Thanks,

Hi,
If the substitution variable contains special characters, such as spaces or single-quotes, then enclosed the whole value in double-quotes, like this:
DEFINE  schema_list = "'aaa', 'bbb', 'ccc'"
If you really need linefeeds in the value, then you might have to use COLUMN ... NEW_VALUE (or OLD_VALUE) to set the value.  For example:
COLUMN schema_list_col NEW_VALUE schema_list
SELECT  '''aaa'', ' || CHR (10)
     || '''bbb'', ' || CHR (10)
     || '''ccc'''     AS schema_list_col
FROM    dual;

Similar Messages

  • User defined Variable with multiple value

    Hi Experts,
    customer requirement is the following:
    Build a layout in which to have in Lead Column the cost center characteristics, but not all cost center in master data but only those chosen by user with manual input. To achieve this goal i have created a variable of type characteristics (associatd to cost center CH) with replacement type "user defined values", then i have put this var in planning level. I have created a layout with Cost Center in Lead Column and set "all possible ch combination" in additional setting.
    Thanks to the varable created, the user can enter Cost Center value, but the problem is that he cannot select more than one single cost center value, for example:
    User want to see in layout CosCen1 and CosCen4, by now he can set variable in order to see the entire range from CosCen1 to CosCen4 (included all intermediate Cost Center) or to see only one between those 2 Cost Center, but it's not possible (or better i don't know how to..) to select both cost center and display the layout with ONLY those 2 Cost Center in Lead Column (CosCen1 and CosCen4).
    In other word, is it possible to set a variable with more than one single value without using range from-to?
    If not, does exist an alternative?
    Thanks in advance.
    Fabio

    Hi Fabio,
    It works as follows.
    let's say you have 3 multiple single lines for your cost center variable.
    once you are in the folder, select any single value & the layout is ready for planning with the corresponding cost center.
    now, select the "Cost center variable row" in the header of the folder within section "Name of Variable" & click on "Trash Can" icon to "Delete Selection" of variable.
    this basically deletes all the entered selections (3 entries) & displays for all.
    It works this way, because we don't have "resriction of values required by user".
    if am not wrong & correct me if am wrong,
    overall, this is nothing but equal to "planning level not restricted with any variable".
    I just tested this & the flaw in this is that, it is not only displaying for all the initially entered 3 lines but it displays for each & every cost center irrespective of the variable selections.
    hope it is clear.

  • Text variables with multiple lines

    Like in my other question: we typeset a lot of juridical books.
    We use text variables in the header for showing the current chapter and for example current author of that chapter.
    So we let the paragraph style of the chapter show in the header.
    When the title is longer then 2 lines in the header, Indesign pushes everything on 1 line. It becomes unreadable.
    We have a solution by putting 2 character style variables underneath each other on the master page or just manually make a new master with the good title on 2 or more lines.
    I have to ask Adobe to look to this 'issue', is this the right place?

    No this isn't the right place - this is a user to user forum -
    You can add your request here https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    What I do is - setup a nested style for
    Runhead line 1 up to 50 characters 
    Runhead line 2 up to end nested style
    Of course you need to have 2 running head styles based on Character Styles
    And insert those into the master page
    Or this will save you tonnes of work
    http://in-tools.com/products/plugins/power-headers/

  • Creating SVG Chart with multiple lines

    Hi All,
    I want to create a chart with multiple lines.
    Ex: I have one emp table with empno, sal and deptno columns.
    I want to print deptno in x axis and no of employees on y axis.
    I want to print one line for employees with sal > 15000 and one more line for employee with sal =< 15000
    So one line will show no of employees with sal more than 15000 for each dept. Similar case for the other line and these 2 lines should be in different colors.
    For one line the query will go as
    select link, deptno, count(empno)
    from emp where sal > 15000 group by null, deptno
    Is this possible to draw this chart?
    Thanks,
    Manoj

    I wasn't able to do something like what you describe, but I was able to do this:
    I defined column A of the table as a Header Row, selected the cells in the table, and chose this chart type (2D 2 Axis):
    Then I clicked the chart and in the pane at the right checked 'Axis Name' in the Axis tab and added the axis names.
    Maybe this can give you an idea of how you can illustrate the relationships that you want to show.
    SG

  • Creating POs with multiple line items

    Hi,
    Is it possible to create a PO with multiple line items from the Sharepoint. The developer guide shows sales order creation with a single line item. If yes, please let me know how it can be done.
    Thanks,
    Pranil

    Hi Pranil,
    You can achieve the user case to create a PO with multiple line items in 1 step by creating a custom solution UI in SharePoint. This is not possible if you simply use the out of box UI (as depicted in the guide).
    It depends on how to define the ESR data type. You can create a data type with header details of PO and collection of items with cardinality as 0..n and create a complex BDC model using SPD --> then create a custom UI.
    Other option would be keep it as 2 lists (2 step action). First create a PO header and then add item by item in 2 steps as foreign key relationship. You can see the example of Account and Activity in pre-shipped contents to get an idea.
    Thanks,
    Girimurugan

  • ALV Hierarichal display with multiple line headings

    Hi,
          I have designed an ALV report with Hierarichal display with multiple line headings...
    When i change the layout of this report,the headings which we enter manually will not take effect.The column we can hide in the report using the layout management.But the heading remains the same since it was written manually in top of page.
    Is there any possiblity to work out the Manual headings based on the layout fields.

    Hi,
    Do you use REUSE_ALV_HIERSEQ_LIST_DISPLAY? Why do you write heading manually? You can use IT_FIELDCAT parameter for defining a field catalog.

  • How to Restrict Single Delivery Date for PO with Multiple Line Items

    Dear Experts,
    How to Restrict Single Delivery Date for PO with Multiple Line Items.
    System needs to through Error Message if User Inputs Different Delivery Dates for PO with Multiple Line Items in ME21N Tcode.
    Can we achive this by Some Enhancement in SAP or Not ???
    If so how to do it.
    Any Inputs is highly appreciated.
    Thanks and Regards,
    Selvakumar. M

    Hi Selvakumar,
    we can resrict the PO to have a single delivery date in all the line items by means of giving a error message or overwiting the delivery date keyed/determined in the line item.
    You can use the BADI -> ME_PROCESS_PO_CUST. In which you need to implement the method PROCESS_SCHEDULE.
    (for technical aid - This method will be called for each and every PO line item, From the imporing parameter im_schedule we can get all the details of current PO line, even we can change the data in the current PO line. )
    Regards,
    Madhu.

  • Error Message with multiple line

    Hi
    How to display a error message with multiple line?
    Example
         Goods movement not possible for material 101
         Goods movement not possible for material 102
         Goods movement not possible for material 103
    is it possible is ABAP? If so please advice me.
    Best Regards
    Asheek

    Hi Anoop,
    You can use same thing like this
    I suggest write ur message through this.
    First set the obecj.
    CALL FUNCTION 'APPL_LOG_SET_OBJECT'
    for local memory
    FUNCTION 'APPL_LOG_WRITE_MESSAGES'
             EXPORTING
                  OBJECT              = OBJECT
                  SUBOBJECT           = SUBOBJECT
                  UPDATE_OR_INSERT    = UPDATE_INSERT_FLAG
             TABLES
                  MESSAGES            = MESSAGE_TABLE
             EXCEPTIONS
                  OBJECT_NOT_FOUND    = 1
                  SUBOBJECT_NOT_FOUND = 2
                  OTHERS              = 3.
    the call for physical memory
    CALL FUNCTION 'APPL_LOG_WRITE_DB'
    In this process you only need to provide the Itab with error messages.
    Reg,
    Arpit

  • Partial goods receipt for PO with multiple line items

    Hello All,
    While doing MIGO, for a PO with multiple line items, if one line item is having error, will we be able to go ahead with goods receipt? Or entire material document is blocked for doing MIGO?
    We will be doing a development - in case if there is problem in goods receipt (checking of any parameter, and if it is missing - we will be posting error message)...is it possible to ahead with next line item and still post the material document?
    If partial goods receipt if possible for PO with multiple line items, how do we do it?
    Regards,
    RJS

    Hi
    While doing MIGO, for a PO with multiple line items, if one line item is having error, will we be able to go ahead with goods receipt? Or entire material document is blocked for doing MIGO?
    No. You cannot post the MIGO, if even one of the PO line item is having problem or giving error.
    We will be doing a development - in case if there is problem in goods receipt (checking of any parameter, and if it is missing - we will be posting error message)...is it possible to ahead with next line item and still post the material document?
    If you skip a line irem and do GR with next line item, how will you match quantity & value with the vendor Invoice at LIV ?
    If partial goods receipt if possible for PO with multiple line items, how do we do it?
    Partial goods receipt is possible for PO line items. That means, if PO has 100 qty for line item 1 then you can do GR for 50 now and 50 later depending on the vendors delivery.
    Hope this is what you mean by "Partial Goods Receipt".
    Edited by: Arun R on May 10, 2010 2:03 PM

  • Word property with multiple lines

    Good Morning,
    I have a Document Library with an Word template, I fill some properties of the library so I can put this properties in the template. I am trying to write a line break, Any idea?
    Thanks.

    Hi,
    According to your post, my understanding is that you want to use Word property with multiple lines.
    Per my knowledge, you can remove two updates: KB2760769 and
    KB2760758.
    The working version of office is 14.0.6129.5000.
    Here is a similar thread for your reference:
    http://sharepoint.stackexchange.com/questions/77759/inserting-multi-line-text-field-quick-part-from-sharepoint-crashes-word
    More information:
    Office 2010 Update KB2760758 Incorrectly Checks Multi-Line Columns
    As this question is more relate to Word, I suggest you post it to the corresponding forum, you will get more help and confirmed answers from there.
    http://social.technet.microsoft.com/Forums/en-US/home?forum=officesetupdeployprevious
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Report script - using substitution variable with multiple values

    Hi All,
    Substitution variable with multiple values is not working correctly with Report scripts. Can you please let me know what is the syntax to assign multiple values to a sub variable using maxl:
    alter database samp.samp set variable 'ExtractQuarter' 'Q1,Q2,Q3,Q4';
    alter database Samp.Samp set variable 'ExtractQuarter' 'Q1:Q4';
    I tried both of the above but they are errored out with the below error:
    Error: 1001005 - Unknown Member [Q1:Q4] in Report.
    my requirement is different for both Actual and forecast data extract so i would like to make use of this variable to extract whole year data for Forecast and current quarter data for Actual with out duplicating the report scripts for both processes.
    Thanks,
    PRaveen

    Hi,
    Please refer following thread,
    range of months in report script?
    Hope it helps.
    Regards

  • Create ecatt script for one sales order creation with multiple line items

    Hi ,
    I want to create a ecatt script for one sales order creation with multiple line items. Preferably SAP GUI.
    This selection of data will be from an external file/ variants which will have only one row of data in it.
    Firstly: I have to sort the external file having same PO Numbers in an order.Group them together.
    Second: I have to create sales order for those many line items having same PO Number.
    Best Regard
    Taranum

    Hi Micky
    Firstl you should upload the Line items for a particular sales Order in an Internal table
    and then pass that internal table to your BAPI during your coding corresponding to a particu;lar sales order
    In case of any issues pls revert back
    Reward points if helpful
    Regards
    Hitesh

  • Unable to create PO with multiple line items through LSMW-BAPI method

    Hi All,
    I have a requirement of creating PO through LSMW. I can't use LSMW standard batch input program since there are some fileds not available and also it has many limitations. I'm using LSMW-BAPI method ( Business object BUS2012) which create IDOC and uses BAPI_PO_CREATE1 to ultimately post the PO in the system. I am trying to create PO from a single file which contains both Header and Item data.
    Now my problem is that everytime PO is being created with Single line item only. Everytime I am giving multiple item data in the source file LSMW is preparing multiple IDOCs for multiple line items. As per my understanding this is happenng since header and item is in the same hierarchy level of IDOC type PORDCR102 and the control record is inserted for every line item in the source file.
    It seems that through LSMW-BAPI  it is not possible to create PO with multiple line items. Can anybody provide some input regarding this? Thanks in advance.
    BR,
    Atanu Mukherjee

    Solved by myself.
    Earlier the problem was that LSMW was not being able to recognize items under same header. It was creating new IDOCs every time it gets a new item. To enable this we need to create two structure HEADERDATA and ITEMDATA.  Two additional identifier fields with identifier value 'H' and 'I' should be added in these two structures respectively. Then we need one sequential file with the identifiers field followed by the header and Item data. Example:
    H~header data
    I~item data
    I~item data 
    This would help the standard program to understand what are the items under same header and ultimately create PO with multiple line items.
    BR,
    Atanu Mukherjee

  • One order with multiple lines in OM is creating multiple invoices

    Application: Oracle 11i (11.5.3)
    Modules implemented: GL, OM, AR, AP, PO and CM
    Business Requirement:
    Our client would like to create Order consisting of multiple lines in Order Management.
    The Orders created in OM with multiple lines could be booked, picked, released and transferred
    over to Accounts Receivable. On transferring over the Orders from Order Management to Accounts
    Receivables using Auto Invoice process the Order should create ONE invoice with multiple lines.
    Moreover, for the multiple lines created on an invoice deferred revenue could be applied.
    ( eg. An order is placed for software and support. The support is to be invoiced all at once but revenue deferred to 1/12
    recognized each month as revenue is earned.)
    Right now we are getting two invoices. It is putting the deferred revenue item on a seperate invoice. Is this normal
    functionality? How can I get both on one invoice.
    thanks

    Hello Monique,
    Well you can have one invoice generated for an order with multiple lines. This is possible by changing some rules in Account Receivables. Use the grouping rules under setups->autoinvoice in AR. You can club your invoices based on any of the columns of ra_interface_lines_all. Hope this works for you.
    Arvind

  • String Array declaration with multiple lines

    I have an array declaration with several indexes where it covers multiple lines.
    Please advise if this is the best way to declare an array declaration with multiple lines:
    String cityString = "San Diego, Oakland, London, New York, Dublin," +
    "Dallas, Milan";
    String city[] = cityString.split(",");

    String[] city = {"San Diego", "Oakland", "London",
    "New York", "Dublin", "Dallas", "Toronto"};You can use indentation and line breaks as you like, as usual in Java.

Maybe you are looking for

  • ABAP list processing statements in ABAP Objects

    Hi, Based on the Online help "The ABAP statements used for list processing are not yet fully available in ABAP Objects". Is there any chnage planned about this for the next WAS release? Thanks, Peter

  • Spry_P1_6_10-01  Photo Gallery questions

    I am attempting to use the Photo Gallery from the newest download of the Spry Framework and I have 2 issues. First, I build the images and thumbs galleries using Photoshop CS3 and the automate photo gallery option to build the library. All of the XML

  • Deauthorized one computer but I still show I have 5 authorized

    So now I'm trying to authorize a new one, and I'm told I can't. Can't Deauthorize all because I did it less than a year ago. This is an ongoing problem. Please help!

  • Cant download flash

    Please help me! I had a problem with my acre laptop a couple of weeks ago and now i can't get flash reloaded. I have been trying for 2 weeks and no success1 i have tried changing my privacy settings and nothing. please help me, my daughter and wife a

  • Trying to add four columns and getting HTTP-404 error

    Hi, I am trying to add 4 dropdowns in an form, but I am getting HTTP-404 error if i insert values in to those 4 dropdowns. Please guide me how to proceed with this. Regards, Pallavi