SQL & operator to read user input

Select employee_id, employee_name from employee where start_date between '&Enter employee start date(format DD-MON-YY HH24:MI:SS)' and '&Enter employee end date(format DD-MON-YY HH24:MI:SS)'
above query is not able to display full text for reading the format
only Enter is displayed and the rest is getting truncated. Can you please help me in using escape characters for spaces and -

How about this (the substitution variable syntax below is valid only for PL/SQL Developer - not SQL*Plus, PL/SQL or SQL in general!)
select employee_id
     , employee_name
from   employee
where  start_date
       between date '&<name="Start date" type=date required=true hint="Enter employee start date(format YYYY-MM-DD)">'
       and     date '&<name="End date"   type=date required=true hint="Enter employee end date(format YYYY-MM-DD)">';Unfortunately it can't check the entered date format (as SQL*Plus can) or prompt with a pop-up date picker.
For more details about PL/SQL Developer's extended substitution variable syntax, go to Help > PL/SQL Developer Help > Reports > Variables.
Edited by: William Robertson on Jun 1, 2011 4:55 PM

Similar Messages

  • How to write table name in SQL according to the user input

    hi
      i want to select data from a table , and the table name, field name is input by the user, for example, user input table name T1, field name F1 and i want to construct a SQL like select F1 into a_var from T1 . how does the SQL statement written? thanks for your advice.

    hi
    for ur requirement u should go for field sysmbols...
    dynamic internal tables..
    u can chk this....
    TYPE-POOLS : slis.
    PARAMETERS : p_struc LIKE dd02l-tabname.
    DATA : it_fieldcat TYPE lvc_t_fcat,
            t_output TYPE REF TO data .
    FIELD-SYMBOLS: <t_output> TYPE table ,
                   <wa_output> TYPE ANY,
                   <fval> TYPE ANY.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      I_BUFFER_ACTIVE              = I_BUFFER_ACTIVE
       i_structure_name             = p_struc
      I_CLIENT_NEVER_DISPLAY       = 'X'
      I_BYPASSING_BUFFER           = I_BYPASSING_BUFFER
      I_INTERNAL_TABNAME           = I_INTERNAL_TABNAME
      CHANGING
        ct_fieldcat                  = it_fieldcat
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 2
      OTHERS                       = 3
    IF sy-subrc <> 0.
    MESSAGE i000(bctrain) WITH 'MERGE FAILED'.
    *ELSE.
    MESSAGE i000(bctrain) WITH 'MERGE SUCCESS'.
    ENDIF.
    CREATE DATA t_newline LIKE LINE OF <t_dyntable>.
    ASSIGN t_newline->* TO <fs_dyntable>.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
       I_STYLE_TABLE             =
        it_fieldcatalog           = it_fieldcat
       I_LENGTH_IN_BYTE          =
      IMPORTING
        ep_table                  = t_output
       E_STYLE_FNAME             =
      EXCEPTIONS
        generate_subpool_dir_full = 1
        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.
    ASSIGN t_output->* TO <t_output>.
    SELECT * up to 10 rows FROM
       (p_struc)  INTO
       CORRESPONDING FIELDS OF
       TABLE <t_output>.
    *write : / 'dynamic table created'.
    LOOP AT <t_output> ASSIGNING  <wa_output>.
      DO.
        ASSIGN component sy-index of structure <wa_output> to <fval>.
        IF sy-subrc <> 0.
          WRITE : /.
          EXIT.
        ELSE.
          WRITE : <fval>.
        ENDIF.
      ENDDO.
    ENDLOOP.
    Message was edited by:
            Premalatha G

  • Cannot Read user input on Adobe Form .

    Hi team,
    Can you please go through the issue -
    Developed Interactive Adobe form. Called by webdynpro application.
    Interactive properties enable, display type - native, with pdfsource, template source and data source cleanly populated.
    Submit button is webdynpro native with option CLICK and corresponding code selected in ADOBE FORM.
    All the elements in adobe forms cleanly binded and checked more than 10 times to avoid any mistakes or wrong bindings.
    Event handler code is written for submit button to read the data eneted by user on adobe form.
      lo_el_zleaver_form->get_static_attributes(
        IMPORTING
          static_attributes = ls_zleaver_form ).
    User is able to enter data on adobe form and control is comming to Submit button code but i am not able to read the user input with above code.
    BASIS has check and confirmed that license is installed properly. I am using adobe reader 9 and adobe designer 8.2 and will ECC version 6.0 . Basis has confirmed the ADS configuration, Java stack and ABAP stack are compatible.
    We are using the ADS from SAP NetWeaver 7.01 (EhP1, Java Stack) in
    combination with SAP NetWeaver 7.00 SP15 (ABAP stack).
    Mohan.

    Hi Guys,
    I also created one more Adobe interactive form to test and again USER INPUT CANNOT BE READ. After user click on SUBMIT button the below code is written in SUBMIT button. I am not able to read department details below enteted by user. Is there any othe method you want me to call. I also tried GET_ATTRIBUTE
    Will there be any problem with above version of ADS or ALD etc..
          DATA lo_nd_zdept TYPE REF TO if_wd_context_node.
          DATA lo_el_zdept TYPE REF TO if_wd_context_element.
          DATA ls_zdept TYPE wd_this->element_zdept.
        navigate from <CONTEXT> to <ZDEPT> via lead selection
          lo_nd_zdept = wd_context->path_get_node( path = `ADOBE.ZDEPT` ).
        @TODO handle non existant child
        IF lo_nd_zdept IS INITIAL.
        ENDIF.
        get element via lead selection
          lo_el_zdept = lo_nd_zdept->get_element( ).
        @TODO handle not set lead selection
          IF lo_el_zdept IS INITIAL.
          ENDIF.
        get all declared attributes
          lo_el_zdept->get_static_attributes(
            IMPORTING
              static_attributes = ls_zdept ).
    This is other interactive form where i also tried GET_ATTRIBUTE
    USING GET_ATTRIBUTE***************
      node_info = lo_nd_zleaver_form->get_node_info( ).
    I tried both GET_ATTRIBUTE and GET_ATTRIBUTES but failed.
      node_info->GET_ATTRIBUTES(
      RECEIVING
      ATTRIBUTES = stru_zleaver_Forms ) .
    OR
    lo_nd_zleaver_form = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_ZLEAVER_FORM ).
      lo_EL_zleaver_form->GET_ATTRIBUTE( EXPORTING NAME  = 'LEAVES_TAKEN'
                               IMPORTING VALUE = LW_LEAVES_TAKEN ).

  • Help With Homework Reading user input into an Array

    This program is to read questions from a file and retrieve user input as answers.
    This program is no where near complete, but I am stuck. (I dont know why, maybe its too late at night)
    I have a total of three classes. I am currently stuck in my main class. See Comments ("What the hell am I printing/ Will this work?"). In this next line of code, i need to read the question from the file to the user, and then accept their input.
    Main Class:
        public static void main(String[] args) {
            try {
            Scanner in = new Scanner(new FileReader("quiz.txt"));
                catch (Exception e) {
                System.out.println(e);
            ArrayList <Questions> Questions = new ArrayList<Questions>();
            ArrayList<String> answers = new ArrayList<String>();
                  for (Questions qu : Questions)
             System.out.println(); //What the hell am I printing.
             String answer = in.nextLine(); //Will this work?
             answers.add(answer); //This should work
          }Questions Class:
    public class Questions {
        String Questions = "";
        public String getQuestions() {
            return Questions;
        public void setQuestions(String Questions) {
            this.Questions = Questions;
        public Questions(String Questions)
            this.Questions = Questions;
    }answers class:
    package QuizRunner;
    * @author Fern
    public class answers {
        String answers = "";
        public String addAnswers() {
            return answers;
        public answers(String answers) {
            this.answers = answers;
        }

    doremifasollatido wrote:
    According to standard Java coding conventions, class names should start with a capital letter (so, your "answers" should be "Answers"). And, variable and method names should start with a lowercase letter (so, your "Questions" should be "questions").
    And classnames should (almost) never be plural words. So it should probably be an 'Answer' and something else containing a collection of those objects called 'answers'.
    Also, *your variable name should not be the same (case-sensitive match) as your class name.* Although it will compile if done syntactically correctly, it is highly confusing! I first wrote this because you did this for both "Questions" and "answers" classes in their class definition, but you also used "Questions" as your variable name in 'main'. (Note that applying the standard capitalization conventions will prevent you from using the same name for your class name as for your variable name, since they should start with different cases.)
    Of course having an 'Answer' called 'answer' is often fine.
    Your Questions class should probably be called "Question", anyway--it looks like it should hold a single question. And, your "answers" class should probably be called "Answer"--it looks like it should hold a single answer. You aren't using your "answers" class anywhere right now, anyway.Correct. There might be room for a class containing a collection of Question objects, but it's unlikely such a class would contain just that and nothing else.

  • Executing SQL-query based on user input in text-box on APEX page

    Hi,
    I'm new to developing in APEX, and I encountered a problem...
    Is it even possible to make such thing: use text area for input of some SQL-query and then execute it on my schema and show results in report item? And if the answer is yes, can somebody provide me tips on how to do that?
    Thanks in advance.

    Denes Kubicek wrote:
    I think this example shows something similar:
    https://apex.oracle.com/pls/apex/f?p=31517:91
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------I see there is executing stored queries example, and text area showing executed one, but not quite understand how to sent sql-query directly from text input, based on your example :/

  • How can i read user input value to my User exist

    Hi Guru's,
    I am facing one problem in Variables in BPS.
    I am calculating days from Month/year .I have one variable it is for Days,Second variable it is for Month/Year.
    First variable is user exist (for calculating the days),Second varible is user defined variable(this is a Input to the first variable).
    When i am giving the Month/Year(02/2008)variable i am getting the 29 days from the first variable.again i am changing the value of Month/Yera(03/2008) i am not getting the desired value.
    my doubt is my user exist not able to read current value of variable(month/year).how can i pass my value to user exist because this value is user input value based on this value i am calculating the days and dynamically displaying the layout.
    Here is the my sample code..
    seq = '0000'.
    ind = 0.
       i_area = 'ZTEST1'.
       area_var = 'ZVar2'.
    PERFORM instantiate_object USING    i_area
                                        area_var
                                 CHANGING lsr_var.
    PERFORM get_current_value_of_variable
                            USING lsr_var
                            CHANGING lto_value.
    READ TABLE lto_value INTO lso_value index 1  .
    i_month = lso_value-low.
    iv_month = i_month+4(2).
    iv_year = i_month(4).
    concatenate iv_year iv_month '01' into iv_date.
    begindate = iv_date.
    below bracket code calculating the leap year
    ( IF iv_date+4(2) = lc_feb.
        lv_hlp_date_year = iv_date+0(4).
        lv_hlp_rest      = lv_hlp_date_year MOD 4.
        IF lv_hlp_rest = 0.
          EV_DAYS = lc_days_29.
          lv_hlp_rest = lv_hlp_date_year MOD 100.
          IF lv_hlp_rest = 0.
            lv_hlp_rest = lv_hlp_date_year MOD 400.
            IF lv_hlp_rest NE 0.
              EV_DAYS = lc_days_28.
            ENDIF.
          ENDIF.
        ELSE.
          EV_DAYS = lc_days_28.
        ENDIF.)
      ELSE.
    below bracket code calculating the days
    (   CASE iv_date+4(2).
          WHEN lc_jan. EV_DAYS = lc_days_31.
          WHEN lc_mar. EV_DAYS = lc_days_31.
          WHEN lc_may. EV_DAYS = lc_days_31.
          WHEN lc_jul. EV_DAYS = lc_days_31.
          WHEN lc_aug. EV_DAYS = lc_days_31.
          WHEN lc_oct. EV_DAYS = lc_days_31.
          WHEN lc_dec. EV_DAYS = lc_days_31.
          WHEN lc_apr. EV_DAYS = lc_days_30.
          WHEN lc_jun. EV_DAYS = lc_days_30.
          WHEN lc_sep. EV_DAYS = lc_days_30.
          WHEN lc_nov. EV_DAYS = lc_days_30.
          WHEN OTHERS.   CLEAR EV_DAYS.
        ENDCASE.)
      ENDIF.
    data: st_date(2) type c.
    st_date = '01'.
    ind = 0.
    ind = ind + 1.
    here i am passing the low value and high value.
    yto_charsel-chanm = '0CALDAY'.
    yto_charsel-seqno = 1.
    yto_charsel-sign  = 'I'.
    yto_charsel-opt   = 'EQ'.
    yto_charsel-LOW = st_date.
    yto_charsel-chanm = '0CALDAY'.
    yto_charsel-seqno = 1.
    yto_charsel-sign  = 'I'.
    yto_charsel-opt   = 'BT'.
    yto_charsel-high = ev_days.
    INSERT yto_charsel INTO sto_charsel INDEX ind.
    ETO_CHARSEL = sto_charsel.
    lto_value = sto_charsel.
    How can i pass user input value to read this exist ,some where again i have to write code or else??
    This is very urgent can you help me..

    Hi,
    Instead of two perform statements, use single perform.
    PERFORM get_value USING i_area
                              i_variable
                         CHANGING lw_varsel.
    Take the values from lw_varsel-low.
    FORM statement for this perform is as follows.
    DATA: li_varsel TYPE STANDARD TABLE OF upc_ys_api_varsel,
            lv_varsel TYPE REF TO cl_sem_variable.
      FORM get_value USING p_area TYPE upc_y_area
                           p_variable TYPE upc_y_variable
                     CHANGING
                           p_lw_varsel TYPE upc_ys_api_varsel.
        CALL METHOD cl_sem_variable=>get_instance
          EXPORTING
            i_area       = p_area
            i_variable   = p_variable
             I_CREATE     =
          RECEIVING
            rr_variable  = lv_varsel.
           EXCEPTIONS
             NOT_EXISTING = 1
             others       = 2
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        REFRESH li_varsel.
    ****Getting the Value*********
        CALL METHOD lv_varsel->get_value
          EXPORTING
            i_user     = sy-uname
            i_restrict = 'X'
          RECEIVING
            rto_value  = li_varsel.
        CLEAR : p_lw_varsel.
        READ TABLE li_varsel INTO p_lw_varsel INDEX 1.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
      ENDFORM.                    "get_value
    Try this code.
    Bindu

  • Trouble reading user input in Mac OSX

    Hi, I am writing a program in Java (1.5) for Mac OSX that requires the user to setup files and settings, then a new frame opens with a blank screen and waits for user input (a key press) to begin. I have a setup screen that works fine (seperate frame) and triggers the blank screen and the rest of the program fine as well. The problem is when I try to have the program pause for user input. For some reason, this thread is no longer responding to user input at all. I have tried with a KeyListener Interface and with System.in.read() as well as BufferedReaders, etc and there are no keypresses registered at all.
    Another object does create a seperate thread to deal with closing down Quicktime elements, but the keypresses are not registering even when that thread has not been called.
    Can anyone tell me what might be the problem? Is there an issue with multiple frames interfering with the KeyListener? I can post the code, if you'd like, but it's pretty involved.
    Any help greatly appreciated!
    Heidi

    Actually, this still isn't working. I'm posting the program class (there are several supporting classes that are not in this post - SetUp opens a SetUp frame and gathers information, then calls MTSNewSwing. Start movie places a Quicktime Component into a Panel, and QTSessionCheck starts a thread that check to make sure that QT sessions are closed when neccessary). KeyPresses are stll not being registered at all.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.*;
    import java.io.*;
    import quicktime.*;
    import quicktime.std.*;
    import quicktime.app.view.*;
    import quicktime.std.movies.*;
    public class MTSNewSwing extends JFrame{
         public Insets getInsets() {
              Insets rm = new Insets (20, 20, 20, 20);
              return rm;
    char key = 'q';
    int correct = 0;
    boolean kp = false;
    int numberOfMovies;
    ArrayList<File> moviesList = new ArrayList();
    ArrayList<File> altList = new ArrayList();
         public MTSNewSwing() {
              super("Matching to Sample");
              setSize(1024, 768);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setBackground(Color.black);
              getRootPane().registerKeyboardAction(new ActionListener(){
                   public void actionPerformed(ActionEvent e) {
                   System.out.println("keystroke"); }
              },KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),JComponent.WHEN_IN_FOCUSED_WINDOW);
              moviesList = SetUp.movieList;
              numberOfMovies = moviesList.size();
              int randomSampleIndex;
              int randomAlternativeIndex;
              boolean corrAltAdded = false;
              //run new trial through numOfTrials
              for (int t = 0; t < SetUp.numOfTrials; t++) {
                   //clear screen
                   BlankScreen bs = new BlankScreen();
                   getContentPane().add(bs);
                   setVisible(true);
                   //put random alternatives into array list
                   randomSampleIndex = (int) (Math.random() * SetUp.numOfMovies);
                   File sample = (File) moviesList.get(randomSampleIndex);
                   altList.add(sample);
                   int correctAlternativePosition = (int) (Math.random() * SetUp.numOfAlternatives);
                   for (int altPosition = 1; altPosition <= SetUp.numOfAlternatives; altPosition++) {
                        if (altPosition == correctAlternativePosition) {
                             altList.add(sample);
                             corrAltAdded = true;
                             System.out.println("correct alternative added");
                        } else if (altPosition == SetUp.numOfAlternatives && corrAltAdded == false) altList.add(sample);
                        else {
                             do {
                                  randomAlternativeIndex = (int) (Math.random() *
    SetUp.numOfMovies);
                             } while (randomAlternativeIndex == randomSampleIndex);      
                             File nextAlt = (File) moviesList.get(randomAlternativeIndex);
                             altList.add(nextAlt);
                             System.out.println("alternative added");
                   corrAltAdded = false;
                   //wait for keypress to start trial
              //this is the part that still doesn't work
                   //add movies to screen
                   for (int i=0; i<= SetUp.numOfAlternatives; i++) {
                        File file = (File) altList.get(i);
                        StartMovie sm = new StartMovie();
                        try {
                             sm.go(file);
                        } catch (Exception e) {
                             e.printStackTrace();
                        if (SetUp.numOfAlternatives < 4) {
                             BorderLayout bdr = new BorderLayout();
                             this.setLayout(bdr);
                             JPanel samp = new JPanel();
                             JPanel alts = new JPanel();
                             BorderLayout altbdr = new BorderLayout();
                             alts.setLayout(altbdr);
                             if (i ==0) {
                                  samp.add(sm);
                                  this.getContentPane().add(samp, BorderLayout.NORTH);
                                  setVisible(true);
                                  System.out.println("sample added");
                             } else if (i == 1) {
                                  alts.add(sm, BorderLayout.WEST);
                                  System.out.println("alt1 added");
                             } else if (i == 2) {
                                  alts.add(sm, BorderLayout.EAST);
                                  System.out.println("alt2 added");
                             } else if (i == 3) {
                                  alts.add(sm, BorderLayout.CENTER);
                                  System.out.println("alt3 added");
                             this.getContentPane().add(alts, BorderLayout.SOUTH);
                             setVisible(true);
                             try {
                                  Thread.sleep(10000);
                             } catch (InterruptedException ex) {
                                  ex.printStackTrace();
                             continue;
         public static void main(String args[]) {
                   SetUp setup = new SetUp();
    }

  • Reading user input in console

    I want to read user information from the console.
    How can I flush the buffer before reading the next input from the user?

    buff = new BufferedReader(new InputStreamReader(
    System.in )); System.out.print("Enter
    Character:");
    System.out.flush();
    String s = buff.readLine();
    c=s.charAt(0);
    System.out.println("You entered " + c + " " + s);
    this is cleaner and more efficient. and is the flush
    to System.out realy neccesary? isn't System.out
    initialized so that any data written is automaticaly
    flushed?Always other ways of doing things, in this case, probably your way is superior. But ... if you do:
          st = new StringTokenizer(S);
          byte b = Byte.parseByte(st.nextToken());... you can make a quick switch for other kinds of data. You could also do:
          String s2 = s.substring(0,1);
          byte b = Byte.parseByte(s2);I suppose. Options ... have a great weekend;
    ~Bill

  • Reading user input from a form within a workflow and perform actions in workflow based on the input

    Sharepoint 2013
    Need to get input from a user based on some condition within a workflow and based on the input received continue with the workflow. It can be a form with a text box and button to which i can redirect and when user enters a value and clicks on the button
    ,I should come back to the workflow and perform other processing. I should also be able to manually start this workflow from VS.
    Tried different approaches like initiation forms ,user input action of SP2010 etc all of these approaches either add some tasks to task list or force me to click on the workflow link to get input from a user.
    Any suggestions on this?

    Hello
    Thanks for the code, but I don't need an array of beans. By the way this code make a bean and an arraylist everytime it's called?
    I was looking for something like this:
    <form action="myjsp.jsp" method="post">
    ...so after submitting the result will go to the myjsp.jsp file and in the myjsp.jsp file
    <jsp:useBean id="value" class"myBean">
    <jsp:setpropertiy name"value" ....>so everytime I click the add button the values will go the mysjp.jsp file and that will set them in the javabean file. this method uses two files but I was looking for doing this in the same jsp file and not sending it to another file.
    chers
    Ehsan

  • I need help with reading user input

    Hi there, I have the following sql query:
    select v.veh_vin, v.veh_make, v.veh_model, v.veh_regonumber, c.cond_desc
    from vehicle v, condition c
    where v.cond_code = c.cond_code and v.br_no = &branch_number
    order by v.veh_make, v.veh_model;
    The query compiles fine, but when I'm prompted to input the value for "&branch_number", I get an error stating "invalid identifier". I make I input the value correctly, but I still keep getting an error. Can anyone tell me what I'm doing wrong? (v.br_no is a CHAR(4 byte) datatype, if this helps.)
    On an unrelated note, what's the difference between using only one ampersand, compared to using two ampersands? (ie. what's the difference between "&branch_number" and "&&branch_number"?)

    Are you providing a char-value? That is are you enclosing it between single quotes?
    You could also do this:
    select v.veh_vin, v.veh_make, v.veh_model, v.veh_regonumber, c.cond_desc
    from vehicle v, condition c
    where v.cond_code = c.cond_code and v.br_no = '&branch_number'
    order by v.veh_make, v.veh_model;Which prevents you from having to provide the quotes every time.
    The double ampersand will prevent being prompted twice (or as many times as the variable is used inside the query).
    Eg.
    select *
    from dual
    where &i = &i
    /Will prompt you twice to provide the value for i. Whereas:
    select *
    from dual
    where &&i = &&i
    /will only prompt you once.
    Toon

  • How to use Pl/sql block to edit check user input

    Hi,
    Please advise on PL/SQL Block code that could be used to Check User input from within a Loop and proceed conditionally based upon User Supplied compliant Input. Thanks in advance.

    Hi,
    yakub21 wrote:
    You could use the ACCEPT to get user input and then assign the input to a variable that could then be verified.
    I believe that anything is possible because we don't yet have proof that it is not!
    I do have code that can accept user input. Is it PL/SQL code? Sybrand was clearly talking about PL/SQL:
    sybrand_b wrote:
    Pl/sql is for server side code, it is not a front end tool, and it is incapable of the functionality you describe.If you do have PL/SQL code that accepts user input, please post an example. A lot of people, including me, would be very interested.
    Pass the user-input value to a variable and then assign that value to another variable from within a Declare of a PL/SQL Block.
    The opportunity here is to figure a way to loop with user input until desired input is entered by the user before proceeding with the code. I'm using PL/SQL Block because I don't want the code to persist. I just want to run it as part of database configuration procedure. ThanksIt sounds like you're talking about SQL*Plus, which is a very poor tool for looping or branching.
    It's possible, but it's not pretty. The following thread shows one way of looping in SQL*Plus:
    Re: How to give the different values to runtime parameters in a loop?

  • How to create database from scratch using user input

    what I am trying to do is to create database via my java code (using hibernate and my sql) and based on user input.
    The details like the name of table.... or the number of columns in it are all supposed to be determined from user input (only the first time).
    On subsequent run the program should remember the previously created database and hence work with it.
    Can somebody help me through this?
    Suppose I did create it using firing queries from my program then the next problem is how my program would start up next time......?????

    Anuvrat wrote:
    what I am trying to do is to create database via my java code (using hibernate and my sql) and based on user input.
    The details like the name of table.... or the number of columns in it are all supposed to be determined from user input (only the first time).
    On subsequent run the program should remember the previously created database and hence work with it.
    Can somebody help me through this?Presumably because you want to (fun) rather than because you need to (job or project.)
    If the second then don't do it.
    >
    Suppose I did create it using firing queries from my program then the next problem is how my program would start up next time......?????You would start by learning about DDL which is the common name for the languages, which vary by database, used to create the entities that represent the structure of a database. Until you figure out the syntax of that you can't do anything in java.

  • Accept user input

    Dear All,
    How do we accept user input in isql*plus in 9i? I am writing pl/sql code that requires user input but i get the message:
    SP2-0850: Command "accept" is not available in iSQL*Plus
    the figure you requested is:
    PL/SQL procedure successfully completed.

    Also you can use some commands at sqlplus to add/delete/append lines of sql buffer.
    append (a)
    insert (i)
    del (d)
    run (r)iline (l) nth line (1l or 2l ...)
    change c/<old value>/<new value>
    etc.,
    << Sample >>
    SRI>select * from bonus;
    ENAME JOB SAL COMM
    Sri DBA 1000 123
    Sam Sales 1022 10
    Elapsed: 00:00:00.00
    SRI>c/*/ename,job
    1* select ename,job from bonus
    SRI>r
    1* select ename,job from bonus
    ENAME JOB
    Sri DBA
    Sam Sales
    Elapsed: 00:00:00.01
    SRI>i
    2 where ename = 'Sri';
    ENAME JOB
    Sri DBA
    Elapsed: 00:00:00.01
    SRI>;
    1 select ename,job from bonus
    2* where ename = 'Sri'
    SRI>2
    2* where ename = 'Sri'
    SRI>DEL
    SRI>;
    1* select ename,job from bonus
    -Sri

  • Failed to accept user input when run report on Web

    I've testing a report with one input parameter. It's a date with default current date. It is done by using SQL 'select sysdate from dual;' has been added to before form trigger. User is allowed to input any date other than the default sysdate before submitting the report. The report works fine when run in report builder, but it's failed to accepted user input date when called through web browser. The report still uses the current date as SQL parameter rather than user input date.
    Can anyone help me to fix this bug?
    The report is develped by Oracle 9i and is saved and run in .rdf format.

    I created a report with a user defined parameter p_date of DATE type. In the layout model, I created a field with p_date as data source. In the before form trigger, I put
    'select sysdate into :p_date from dual;
    I run the report through rwservlet:
    http://host:port/reports/rwservlet?report=datetest.rdf&destype=cache&desformat=html&userid=scott/tiger@orcl&paramform=yes
    In the html parameter form, I change the date from default current date to a future date and that date is shown in the final report.
    So I can't reproduce the bug.
    One thing you can try it to turn on reports server trace file, see what command line is sent to reports server when you submitting the parameter form.
    Thanks,
    -Shaun

  • SharePoint 2013 - Server Error in '/' Application - This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database

    Hi
    After I ran SharePoint configuration wizard successfully to upgrade to SharePoint 2013 / SP1.
    I can open Central Administration site just fine.
    but now when I open any Site collection,  I got this error.
    Server Error in '/' Application
    This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database. To connect this server to the server farm, use the SharePoint Products Configuration
    Wizard, located on the Start menu in Microsoft SharePoint 2010 Products
    I have restarted all the servers:  SQL server, WFE and APP servers but still cann't get this resolve.
    Services on all servers are running,  IIS - application pools are running.
    Can someone help with where that could be a problem or if there is a solution.
    Thanks in advance for your comments or advices.
    Swanl

    Please verify the followings:
    Make sure that from the SharePoint front end and application servers that you can ping your SQL server.
    Make sure that your Farm account has permission to the configuration database.
    Lastly verify that your database didn't for some reasons go into recovery mode.
    once everything is fine and you are still having issues, restart the SQL host service on the SQL server.
    Once the service is restarted you will need to reboot Central Admin and then your front end servers.
    In addition, as you built your farm inside the firewall, please disable the firwall, or create rules for SQL Server service in the firwall on SQL server.
    More information about creating rules in firewall, please refer to the following posts: http://social.technet.microsoft.com/Forums/en-US/c5d4d0d0-9a3b-4431-8150-17ccfbc6fb82/can-not-create-data-source-to-an-sql-server http://www.mssqltips.com/sqlservertip/1929/configure-windows-firewall-to-work-with-sql-server/
    Here is a similar post for you to take a look at: http://social.technet.microsoft.com/Forums/en-US/ea54e26c-1728-48d4-b2c5-2a3376a1082c/this-operation-can-be-performed-only-on-a-computer-that-is-joined-to-a-server-farm-by-users-who-have?forum=sharepointgeneral 
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

Maybe you are looking for

  • GL Data Load - INIT and FULL

    Hi, I am getting different record count for Full and Init GL - Data loads. Count for Init is about 300 records less than the count for Full load. What could be the reason ? Thanks,

  • MR11 - post to sepcific accounts

    I need to clear the GR/IR account by MR11, i would like to know it is possible post the balance to specific in order to clear the GR/IR. So the outcome would be DR GR/IR and CR sepcific accounts after done the MR11. Thanks!

  • Dynamic SELECT statement causing CX_SY_DYNAMIC_OSQL_SEMANTICS error.

    Hello Gurus, We have a dynamic SELECT statement in our BW Update Rules where the the Selection Fields are populated at run-time and so are the look-up target and also the WHERE clause. The code basically looks like below:           SELECT (lt_select_

  • Fonts in FCP

    Fonts in the newest FCP are still problematic. Only truetype versions can be used, not postscript, and in the truetypefonts the built-in kerning is not taken literally, the letters are placed a bit more crampy. Boris is not correct too, so I have to

  • Moving Sync from one computer to another.

    Hi Folks! I have been using an old Mac Mini to sync my iPhone 3G to and want to move it to an older G5. When I first plugged the iPhone into the G5 I got the expected warning about loosing all the data currently on the phone. I can, and have, moved m