How can i insert the variable value in MS ACCES Query

i am creating one Query (query1) in MS ACCESS ( like we creaate Tables, Forms and Reports in MS ACCESS ) in this Query i have given 2 constent value in BETWEEN CLAUSE , after that i Created a CROSS QUERY which is based on the privious Query (query1).
Now i want to insert the variable value using JSP and HTML in to Query(query1).
Doing this i want to execute the Query (query1) with variable perameters and
wants to get the risponce form CROSS QUERY.
In this matter how can i insert the value in Query(query1) using JDBC and JSP.

The query is
Select ZMSGMAP.GROUP_CODE as 'group', ZMSDSTATE.STATE_DESC as 'state', ZMSTRN.YRMON, sum(ZMSTRN.CMAQTY) as 'qty' from ZMSDSTATE,ZMSGMAP,ZMSTRN Where ZMSTRN.STATE=ZMSDSTATE.STATE and ZMSTRN.PLANT=ZMSGMAP.PLANT_CODE and ZMSTRN.YRMON between "+p1+" and "+p2+" Group by ZMDGMAP.GROUP_CODE, ZMSDSTATE.STSTE_DESC, ZMSTRN.YRMONUsing this query i m trying to display the risult but the YRMON is displaying in a single column, i want to display it ia seperat columns. here p1 and p2 is YRMON(it is the yer month like 200102), for this solution i have created Cross table Query which is based on uper Query (query1) and design it column wise Display, it is givng the right display, but the problem is this i m not getting the technique throw which i can insert the variable values in to the query1 (which is designed in MS ACCESS).
u can contact me on [email protected] for more details.

Similar Messages

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

  • Using action script 2 how can i send a variable value to a dynamic textbox on a different keyframe?

    using action script 2 how can i send a variable value to a dynamic textbox on a different keyframe?

    Thanks for your swift response.
    That sounds like a good solution, but the code I have on frame 2 is this
    timer = 0;
    countup = function(){
    timer++;
    countupInterval = setInterval(countup,100);
    If I added the same actionscript to frame 3 which has a dynamic textbox with a variable timer attached wouldn't it just put the timer back to 0? What I want is the last known value that was given when it was in frame 2.
    I am thinking of temple run here, I am trying to caculate the total distance(set in the timer variable) from the previous try.
    Hope this makes sense.
    Chazwick

  • How can I convert the variable expression stored as string back to variable expression

    How can I convert the variable expression stored as string back to variable expression?
    I am storing the expression enterd in the TSExpresssionEditControl as simple string and want to convert back to expression since I want to get the data type of that expression.

    pritam,
    I'm not sure what you're trying to do exactly. If you are trying to get the value of a variable and you only have the name of value in a string, then you can use Evaluate() to get its value. If you want the data type, my advise is to use the GetPropertyObject() API method and just pass in the loop up string. Then you'll have a handle to the data object and then proceed from there.
    Regards,
    Song D
    Application Engineer
    National Instrument
    Regards,
    Song Du
    Systems Software
    National Instruments R&D

  • How can i view the variables of the session memory

    Hi experts
       How can i view the variables of the session memory.Such as I want display the variables of memory which id is 'BULRN' in ABAP debug.
    In program i can use import from memory id visit the momery of session,but i don't know the name of variables which store in momery of my session.

    Its not possible to view in the debug mode..
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens
    SAP global memory retains field value through out session.
    set parameter id 'MAT' field v_matnr.
    get parameter id 'MAT' field v_matnr.
    They are stored in table TPARA.
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    ABAP memory is temporary and values are retained in same LUW.
    export itab to memory id 'TEST'.
    import itab from memory Id 'TEST'.
    Here itab should be declared of same type and length.

  • How can i get this variable value into second page IN BSP

    Hi friends
    I have variable wk_matnr value 'ABC' in first page of BSP.
    How can i get this variable value into second page.
    Moosa

    Hi,
    you can define variable (page attribiue) on the second page with the same name. You can realise the Navigation with Button ther started onInputProcesing routine. In onInputProcesing you have to call navigation->set_parameter with attribut name as parameter and then starting the navigation. If you have checked the auto property on the variable on second page and varable have same name, the value of variable should be transported.
    [See this tutorial|http://help.sap.com/saphelp_erp2005/helpdata/DE/1a/c5133a62983c0ae10000000a114084/frameset.htm]
    Best regards
    Bogdan

  • How can i select the duplicate values

    Hi experts ,
    how can i find the duplicate values from the table. i want to display the all duplicate the rows.
    1. Table Structure :-
    CREATE TABLE CIF_MIGRATE
      LINE_NO        NUMBER(10),
      ACCT_NO        VARCHAR2(20 BYTE),
      BRANCH_ID      VARCHAR2(1 BYTE),
      CUSTOMER_NAME  VARCHAR2(100 BYTE),
      FATHER_NAME    VARCHAR2(100 BYTE),
      GF_NAME        VARCHAR2(100 BYTE),
      TOTAL          VARCHAR2(100 BYTE),
      STATUS         VARCHAR2(100 BYTE),
      CUSTOMER_TYPE  VARCHAR2(10 BYTE),
      GENDER         VARCHAR2(10 BYTE)
    ) 2. Sample Data:-
    SET DEFINE OFF;
    Insert into CIF_MIGRATE
       (LINE_NO, BRANCH_ID, CUSTOMER_NAME, CUSTOMER_TYPE)
    Values
       (72, '1', 'Addis Belay Construction Material Rental', 'C');
    Insert into CIF_MIGRATE
       (LINE_NO, BRANCH_ID, CUSTOMER_NAME, CUSTOMER_TYPE)
    Values
       (73, '1', 'Addis Belay Construction Material Rental', 'C');
    SET DEFINE OFF;
    Insert into CIF_MIGRATE
       (LINE_NO, BRANCH_ID, CUSTOMER_NAME, FATHER_NAME, CUSTOMER_TYPE, GENDER)
    Values
       (2869, '1', 'Abraham', 'Fiseha',
        'I', 'Male');
    Insert into CIF_MIGRATE
       (LINE_NO, BRANCH_ID, CUSTOMER_NAME, FATHER_NAME, CUSTOMER_TYPE, GENDER)
    Values
       (2870, '9', 'Abraham', 'Fiseha',
        'I', 'Male');
    Insert into CIF_MIGRATE
       (LINE_NO, BRANCH_ID, CUSTOMER_NAME, FATHER_NAME, GF_NAME, CUSTOMER_TYPE, GENDER)
    Values
       (2872, '9', 'Abraham', 'Baraki',
        'Medehniye', 'I', 'Female');
    Insert into CIF_MIGRATE
       (LINE_NO, BRANCH_ID, CUSTOMER_NAME, FATHER_NAME, GF_NAME, CUSTOMER_TYPE, GENDER)
    Values
       (2873, '1', 'Abraham', 'Geber kirstos',
        'gebre medihin', 'I', 'Female');
    Insert into CIF_MIGRATE
       (LINE_NO, BRANCH_ID, CUSTOMER_NAME, FATHER_NAME, GF_NAME, CUSTOMER_TYPE)
    Values
       (2874, '1', 'Abraham', 'Gebre egziabher',
        'Negussie', 'I');
    COMMIT;4. My requirement is i need display all the duplication customer
    CUSTOMER_NAME                                 FATHER_NAME,GF_NAME
    Addis Belay Construction Material Rental   
    Addis Belay Construction Material Rental
    Abraham                                              Fiseha
    Abraham                                              Fiseha5. I tried below query but i cant reach what i want exactly
    SELECT CUSTOMER_NAME,FATHER_NAME,GF_NAME
                               FROM CIF_MIGRATE
                          GROUP BY CUSTOMER_NAME,FATHER_NAME,GF_NAME
                             HAVING COUNT (*) > 1kindly suggest me the solution
    Thanks
    Arun

    Hi,
    You're on the right track using COUNT (*), but, for this job, you want the analytic COUNT, not the aggregate COUNT.
    "GROUP BY x, y, z" means that the result set will only contain 1 row for each distinct combination of x, y and z. Most aggregate functions (including COUNT) have analytic counterparts that get the same results without reducing the number of rows.
    Here's one way you can use the analytic COUNT function:
    WITH     got_cnt          AS
         SELECT    customer_name
         ,       father_name
         ,       gf_name
         ,       COUNT (*) OVER ( PARTITION BY  customer_name
                               ,                 father_name
                         ,           gf_name
                         )     AS cnt
         FROM       cif_migrate
    SELECT    customer_name
    ,       father_name
    ,       gf_name
    FROM       got_cnt
    WHERE       cnt     > 1
    ;PARTITION BY in analytic functions corresponds to GROUP BY in aggregate functions.

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How can I get the edited value from the editor in JTable

    I have a JTextField added as an editor to a cell in JTable.
    I value gets changed when I press enter.
    but in actionPerformed of the JTextField when I say
    String txtEditorValue = txtEditor.getText();
    I am getting the old value. How can I get the edited value? Thanks.

    Hi,
    I guess, your understanding of how JTable works together with its models is not good enough - for example the method getTableCellEditorComponent(...) of the TableCellEditor interface is used to get the component, that should be used as editing component - its second parameter is a value that should be used to setup the editing component - it is normally not the editing component itself.
    JTable uses an underlying TableModel to store the cell values - if you have edited a cell, JTable gets the value of the editing component by itself and stores it in the TableModel using its setValueAt(...) method. To retrieve this data you only need to query the TableModel using row and column of this cell as parameters
    say jt is your JTable, and row and column are the row and column of the cell - so to get the value, simply use
    Object obj = jt.getModel().getValueAt(row,column);
    if you know, that there is a String in this cell use
    String str = (String) jt.getModel().getValueAt(row,column);
    The editor component is used for the view of the JTable - you only want the data, which is stored in the model - you don't have to deal with the GUI components in this case.
    greetings Marsian

  • How can i pass the Input value to the sql file in the korn shell ??

    Hi,
    How can i pass the Input value to the sql file in the korn shell ??
    I have to pass the 4 different values to the sql file and each time i pass the value it has to generate the txt file for that value like wise it has to generate the 4 files at each run.
    can any one help me out.
    Raja

    Can you please more elaberate., perhaps you should more elaberate.
    sqlplus is a program. you start it from the korn shell. when it's finished, processing control returns to the korn shell. the korn shell and sqlplus do not communicate back and forth.
    so "spool the output from .sql file to some txt file from k shell, while passing the input parameters to the sql file from korn shell" makes no sense.

  • How can I get the default value of a particular preference programatically. I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    How can I get the default value of a particular preference in FireFox?.
    I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
    I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
    Any help towards acheiving this programtically is greatly appreciated.
    If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Dear Friend,
    Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
    Then you can get the value from the outparameter using callablestatement.getXXX().
    Try that way.
    For free tral versions of JDBC Drivers go to www.Atinav.com

  • How can I reference the last value in a column?

    How can I reference the last value in a column? For example, today I want the value of A1 to appear in another cell. Tomorrow, I will add a row and want to reference A2, next day A3, and so forth.

    Now I got it:
    =OFFSET(A1,COUNT(A)-1,0)

  • How can i write the floats value in Unitronics vision230 plc using modbus Ethernet

           How can i write the Float value in unitronics Vision230 PLC usinsg modbus ethernet (MB Ethernet Master Query.vi) I  read and write  the 32 bit register,  for e.g i want to write the 23.45 value on 2nd add. of MF. And MF register is 32 bit register. I  read and write  the 32 bit register.
    Narendra.
    Solved!
    Go to Solution.

     Thanks Amit for your solution but i can not use the string to write the value because  MB Ethernet master Query.vi only accepet the integer value its not take string values or any other i.e floats values etc.....otherwise i have  no problem to write or read the 32 bit register values , only problem is that the MB Ethernet master Query.vi only accept the integer value there4 how can write the float value.
    Narendra
    Message Edited by Artemistech on 01-30-2009 11:06 PM

  • In Jsp TagLib how can I get the Attribute value (like JavaBean) in jsp

    Dear Friends,
    TagLib how can I get the Attribute value (like JavaBean) in jsp .
    I do this thing.
    public void setPageContext(PageContext p) {
              pc = p;
    pc.setAttribute("id", new String("1") );
              pc.setAttribute("first_name",new String("Siddharth")); //,pc.SESSION_SCOPE);
              pc.setAttribute("last_name", new String("singh"));
    but in Jsp
    <td>
    <%=pageContext.getAttribute("first_name"); %>
    cause null is returing.
    Pls HELP me
    with regards
    Siddharth Singh

    First, there is no need to pass in the page context to the tag. It already is present. How you get to it depends on what type of tag:
    Using [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/SimpleTagSupport.html]SimpleTagSupport
    public class MyTag extends SimpleTagSupport
      public void doTag()
        PageContext pc = (PageContext)getJspContext();
        pc.setAttribute("first_name", "Siddharth");
        pc.setAttribute("last_name", "Singh");
        pc.setAttribute("id", "1");
    }Using [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/TagSupport.html]TagSupport or it's subclass [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/BodyTagSupport.html]BodyTagSupport the page context is aleady declared as an implicit object:
    public class MyTag extends TagSupport
      public void doStartTag()
        pageContext.setAttribute("first_name", "Siddharth");
        pageContext.setAttribute("last_name", "Singh");
        pageContext.setAttribute("id", "1");
    }In each case, this sort of thing should work:
    <mytags:MyTag />
    <%= pageContext.getAttribute("first_name") %>I

Maybe you are looking for

  • New DVI-standard doesn't fit with old Apple adapter

    I bought a new MBP i7 the last week and was very surprised when i noticed that the adapter i bought (Mini Display to DVI) doesn't fit with my old adapter (DVI to VGA). Apples new DVI-adapter us the DVI-D standard and that doesn't work well with teh D

  • Itunes dosen't recognize my ipod

    itunes dosen't recognize my ipod

  • Repeated wlc 5508 client web authentication

    I'm trying to troubleshoot a situation where many of our guest wireless users are repeatedly being prompted to reauthenticate via the web interface.  the session timeout is set to 4 hours, however, many times a client is presented with a web authenti

  • Suppress header on Page 1?

    Hello- How do I suppress the header on the first page of a document? I tried simply deleting the text from the header on page 1, but then it deleted the page header on all the subsequent pages. In the old days, you could just select "Different First

  • Download Query execution to a File - APD

    Hi, I would like to download to a file the execution of a Query. I thought in APD, but I am facing an issue. The layout of the query is the following (and as I expect to be in the flat file):                                KF 1          KF 1