WHERE and LIKE in WebLogic Query Language

Hi.
I'm using JBuilder 5.0, Weblogic 5.1 and I have a problem with WHERE and LIKE
in WebLogic Query Language.
For example, when I create the <finder> :
<finder-query>![CDATA[(like ColumnName 'var%' )]]</finder-query>
I get ### Warning: Cannot convert query: Illegal tag 88 encountered: ColumnName
like $0 line: -1
and I get a: - Illegal tag - in deployment. I tried to change the XML file,
but the result was the same.
Why doesn't work ( http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#1022700
Thanks.
Lorenzo

Lorenzo Garbuio wrote:
Hi.
I'm using JBuilder 5.0, Weblogic 5.1 and I have a problem with WHERE and LIKE
in WebLogic Query Language.
For example, when I create the <finder> :
<finder-query>![CDATA[(like ColumnName 'var%' )]]</finder-query>
I get ### Warning: Cannot convert query: Illegal tag 88 encountered: ColumnName
like $0 line: -1I'm not exactly sure what's going on, but for starters, try taking the single quotes out as in:
<finder-query>![CDATA[(like ColumnName var% )]]</finder-query>
-thorick

Similar Messages

  • Weblogic Query Language

     

    http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_whatsnew.html#1034424
    Thanks,
    Michael
    Michael Girdley
    Sr. Product Mgr, WebLogic Server & Express
    Antonio Sollano <[email protected]> wrote in message
    news:[email protected]..
    Hi all,
    Please I´m looking for documentation on WebLogic Query Language
    Any ideas?
    Thx
    Tonio

  • EJB Query Language where condtion based on date

    Hi,
    I am using EJB3 query language. In the table I have a column called requestdate which is in date time format. I have created an entity class.
    I need to select few records using query language(named queries) based on this requestdate matching to the current date. I want to compare only based on Date value (truncating the time). Something like this
    select max(o.req_id) from requests o where o.requestdate = :currentdate
    currentdate is java.sql.Date value formatted to yyyymmdd only.
    How can I do this using query language?
    Please help to me get this done.
    thanka
    Anuradha

    Hi Anuradha ,
    I'm afraid the query language does not support retrieving the date portion (i.e. truncating the time) from a date field.
    I propose you turn you named into a BETWEEN query taking two parameters one for the beginning of the day and another for the end of the day. Then your named query could look like:
    SELECT max(o.req_id) FROM requests o WHERE o.requestdate BETWEEN :start AND :end
    The following code creates two calendar instances for the current day, one for 00:00:00 and another for 23:59:59:
    Calendar start = Calendar.getInstance();
    start.set(Calendar.HOUR_OF_DAY, 0);
    start.set(Calendar.MINUTE, 0);
    start.set(Calendar.SECOND, 0);
    start.set(Calendar.MILLISECOND, 0);
    Calendar end = Calendar.getInstance();
    end.set(Calendar.HOUR_OF_DAY, 23);
    end.set(Calendar.MINUTE, 59);
    end.set(Calendar.SECOND, 59);
    end.set(Calendar.MILLISECOND, 999);
    Here is some sample code that creates a query instance for a named query called findMaxRequestPerDay and passes the Date of the above Calendar instance as actual parameter values. It assumes the named query is called findMaxRequestPerDay and the req_id field is a long:
    Query query = em.createNamedQuery("findMaxRequestPerDay");
    query.setParameter("start", start.getTime());
    query.setParameter("end", end.getTime());
    Long max = (Long)query.getSingleResult();
    I hope this helps.
    Regards Michael

  • About regex and 'like' query

    Dear all,
    can i doing regex query in SAP B1?
    And how to use 'like' query with table, i mean :
    SELECT * FROM test T0 INNER JOIN test2 T1
    WHERE T0 LIKE '%T1.testfield%'
    thanks for your help

    wait - something came out funny in the previous posting - the system highlighted the name "field" with blue - that is NOT what I typed...
    instead I typed...
    "field" between two brackets ( bracket = [ and the other bracket - I cannot type them in because they come out as a different character)
    what the heck is going on with the forum here???  I am seeing this highlighting in other postings as well...
    Hope THIS one comes out correctly
    Edited by: Zal Parchem on Dec 29, 2007 2:47 PM

  • Mysql select statement where = works and LIKE fails

    I am using Flash Builder 4. On the server side I use php and mysql. I created a php dataservice using FB4. My plan had been to allow users to enter a search term and query the database using a "LIKE" statement. FB4 created the php code that I simply modified changing the parameter name. The input parameter is a string.
    public function getT_caseByID($searchTerm) {
    $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename WHERE (title = ?)");
    $this->throwExceptionOnError();
    mysqli_stmt_bind_param($stmt, 'i', $searchTerm);
    $this->throwExceptionOnError();
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
    mysqli_stmt_bind_result($stmt, $row->idt_case, $row->title, $row->id_author, $row->comments);
    if(mysqli_stmt_fetch($stmt)) {
          return $row;
    } else {
          return null;
    A look at FB4 shows this code returns data.
    This code works fine but if I make the below change it fails, even when I use the wildcard %. the only change is "=" to "LIKE".
    public function getT_caseByID($searchTerm) {
    $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename WHERE (title LIKE ?)");
    $this->throwExceptionOnError();
    mysqli_stmt_bind_param($stmt, 'i', $searchTerm);
    $this->throwExceptionOnError();
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
    mysqli_stmt_bind_result($stmt, $row->idt_case, $row->title, $row->id_author, $row->comments);
    if(mysqli_stmt_fetch($stmt)) {
         return $row;
    } else {
         return null;
    A look into FB4 shows "void".
    Any help would be appreciated. I am using localhost on Apache Server on a development computer with Windows XP.

    correctio0n on the select statement
    select statement code*********
    select
        apspnr astspr aobjnr apspid
        bpsphi bposid
        caufnr cpspel
        dinact dstat
        eudate eusnam eutime "estat
       F~TXT04
        g~estat
        G~TXT04
        into corresponding fields of table itobj
        from proj as a
        inner join prps as b on apspnr = bpsphi
        inner join aufk as c on bpspnr = cpspel
        inner join jest as d on cobjnr = dobjnr
        inner join jcds as e on dobjnr = eobjnr
                             and dstat = estat
        inner join tj02t as f on estat = fistat
        inner join tj30t as g on astspr = gstsma
        for all entries in itparm
        where  apspid = itparm-pspid "or estat = itparm-psy )
        or  bposid = itparm-posid "or estat = itparm-wsy )
        or  caufnr = itparm-aufnr "or estat = itparm-nsy  )
        and ( dinact  'X' or einact  'X')
        and fspras = 'E' and gspras = 'E'.

  • Where and what to download if I like to use Oracle Form 11g

    Hello all:
    where and what to download if I like to use Oracle Form 11g
    Thx in advance.

    hi
    check out the following link.
    Oracle Forms 11g available now!!
    http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html
    Re: Install Forms & Rpts 11.1.1.3 with WebLogic Server 10.3.3 on Win32
    hope this helps u.
    sarah

  • At bottom of my screen where all my icons are I now have a picture of a key and like sound waves and a x and I cannot log on to a lot of my programs and don't k

    At bottom of my screen where desktop Icons are I have a picture of a key and like soundwaves and a red circle with an x in it. When this comes on I can't open a lot of my programs. I am a real novice and am not sure what to do.

    Please provide a screenshot of that "key".
    https://support.mozilla.org/en-US/kb/how-do-i-create-screenshot-my-problem
    It is best to use a compressed image type like PNG or JPG to save the screenshot and make sure that you do not exceed a maximum file size of 1 MB.
    Then use the '''Browse ....''' button below the '''''Post a Reply''''' text box to upload the screenshot.

  • Q: LIKE or = in WHERE and READ...

    Hi,
    I have a problem with my code below. The problem is either in my SELECT-statement or in my READ-statement. I am having problems debugging so I cannot narrow it down. I have the following code:
    SELECT DISTINCT MAT_SALES
        FROM /BI0/PMAT_SALES
        INTO TABLE i_mat_sales
        WHERE /BIC/ZACCASGRP IS NULL
                OR /BIC/ZACCASGRP LIKE ' '
                OR /BIC/ZACCASGRP LIKE 'A1'
                OR /BIC/ZACCASGRP LIKE 'C3'.
    LOOP AT SOURCE_PACKAGE into source_wa.
        T_INDEX = SY-TABIX.
         READ TABLE I_MAT_SALES WITH KEY MSALE =
                 source_wa-MAT_SALES TRANSPORTING NO FIELDS.
         IF SY-SUBRC NE 0.
                DELETE SOURCE_PACKAGE INDEX T_INDEX.
         ENDIF.
    The MAT_SALES field and the ZACCASGRP fields are both of type CHAR, and I have changed my where to LIKE instead of = but for the READ is not possible to use LIKE.
    Does anybody have any idea about what can be wrong in this code?
    Thank you in advance,
    Mikael

    Hi
    First of all you can instead of
    OR /BIC/ZACCASGRP LIKE ' '
    OR /BIC/ZACCASGRP LIKE 'A1'
    OR /BIC/ZACCASGRP LIKE 'C3'.
    you can write
    OR /BIC/ZACCASGRP IN (' ','A1','C3').
    Second.
    /BIC/ZACCASGRP IS NULL  you ask if it initial
    /BIC/ZACCASGRP LIKE ' '    you ask if it empty
    you need only one of them
    and...
    i dont think that in checking you need
    TRANSPORTING NO FIELDS
    plus
    you can check if MSALE and
    source_wa-MAT_SALES have same type...
    also
    LOOP AT I_MAT_SALES into wa_mat_sales.
    DELETE SOURCE_PACKAGE where MAT_SALES  = WA_MAT_SALES-MSALE.
    ENDLOOP.
    instead of your lines
    LOOP AT SOURCE_PACKAGE into source_wa.
    T_INDEX = SY-TABIX.
    READ TABLE I_MAT_SALES WITH KEY MSALE =
    source_wa-MAT_SALES TRANSPORTING NO FIELDS.
    IF SY-SUBRC NE 0.
    DELETE SOURCE_PACKAGE INDEX T_INDEX.
    ENDIF.
    Regards
    Yossi
    Message was edited by:
            Yossi Rozenberg
    Message was edited by:
            Yossi Rozenberg

  • I was bill$99.99 and I would like to report a wrong billing. Where and how can I do that?

    I was bill$99.99 and I would like to report a wrong billing. Where and how can I do that?

    You need to dispute the transaction with your credit card company. Apple is only a merchant. You can also contact the iTS web based customer service and tell them but they will direct you to dispute with the CC company.
    Change your iTS password.
    MJ

  • Simple Select query with 'where', 'and', 'between' clauses takes time

    Hi,
    I have a select query as below
    SELECT * FROM (SELECT a.*,ROWNUM currentStartRecord From (select ai_inbound.ai_inb_seq tableseq,'AI_INBOUND' tablename,'INBOUND' direction,ai_inbound.appl,ai_inbound.ai_date datetime,ai_inbound.ic_receiver_id pg_id,ai_inbound.ic_sender_id tp_id,ai_inbound.session_no,ai_inbound.ic_ctl_no,ai_inbound.msg_set_id msg_type,ai_inbound.appl_msg_ctl_no reference_no,ai_inbound.fg_version version,ai_inbound.msg_status status,ai_inbound.input_file_name,ai_inbound.output_file_name,ai_inbound.ack_file_name from ai_inbound where ai_inbound.appl = ? and ai_inbound.ai_date between ? and ? )a where ROWNUM <= 49)where currentStartRecord >= 0
    The above query takes longer time through application than expected when the date fields are passed whereas it works fine when no date fields are passed. We are using oracle9.2 version of the database. All the indexed columns and partitioned indexed columns are rebuild.
    Kindly let me know how can i tune up the query to improve the performance.
    Thanks

    Hi,
    I have a select query as below
    SELECT * FROM (SELECT a.*,ROWNUM currentStartRecord From (select ai_inbound.ai_inb_seq tableseq,'AI_INBOUND' tablename,'INBOUND' direction,ai_inbound.appl,ai_inbound.ai_date datetime,ai_inbound.ic_receiver_id pg_id,ai_inbound.ic_sender_id tp_id,ai_inbound.session_no,ai_inbound.ic_ctl_no,ai_inbound.msg_set_id msg_type,ai_inbound.appl_msg_ctl_no reference_no,ai_inbound.fg_version version,ai_inbound.msg_status status,ai_inbound.input_file_name,ai_inbound.output_file_name,ai_inbound.ack_file_name from ai_inbound where ai_inbound.appl = ? and ai_inbound.ai_date between ? and ? )a where ROWNUM <= 49)where currentStartRecord >= 0
    The above query takes longer time through application than expected when the date fields are passed whereas it works fine when no date fields are passed. We are using oracle9.2 version of the database. All the indexed columns and partitioned indexed columns are rebuild.
    Kindly let me know how can i tune up the query to improve the performance.
    Thanks

  • Ios 6 have some bugs on ipod touch 4g like appstore search bug and accessibility which i cant go out from and crashes every where and imassages that the massge i send goes up and stick to the other messages plz help or do ios 6.1

    Ios 6 have some bugs on ipod touch 4g like appstore search bug and accessibility which i cant go out from and crashes every where and imassages that the massge i send goes up and stick to the other messages plz help or do ios 6.1 can i change my a4 chip plz i swear when i pressed done to submite this safari crashed

    Try to do a hard reboot (no data is lost) by holding down the home and power buttons at the same time untilyou see the Apple logo. Then, let go of both buttons. If that doesn't work, try restoring your iPod and do NOT restore from a backup. This will erase your data, but you can sync back everything except app data and settings from iTunes.

  • Difference b/w DATA TYPE and DATA OBJECT & differences b/w TYPE and LIKE

    hai
    can any one say the differences between Data type and Data Object.
    And also differences between TYPE and LIKE
    thanks
    Gani

    hi,
    _Data Types and Data Objects_
          Programs work with local program data – that is, with byte sequences in the working memory. Byte sequences that belong together are called fields and are characterized by a length, an identity (name), and – as a further attribute – by a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.
          In the ABAP type concept, fields are called data objects. Each data object is thus an instance of an abstract data type. There are separate name spaces for data objects and data types. This means that a name can be the name of a data object as well as the name of a data type simultaneously.
    Data Types
       As well as occurring as attributes of a data object, data types can also be defined independently. You can then use them later on in conjunction with a data object. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program using the TYPESstatement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.
         All programming languages distinguish between various types of data with various uses, such as ….. type data for storing or displaying values and numerical data for calculations. The attributes in question are described using data types. You can define, for example, how data is stored in the repository, and how the ABAP statements work with the data.
    Data types can be divided into elementary, reference, and complex types.
    a. Elementary Types
    These are data types of fixed or variable length that are not made up of other types.
    The difference between variable length data types and fixed length data types is that the length and the memory space required by data objects of variable length data types can change dynamically during runtime, and that these data types cannot be defined irreversibly while the data object is being declared.
    Predefined and User-Defined Elementary Data Types
    You can also define your own elementary data types in ABAP using the TYPES statement. You base these on the predefined data types. This determines all of the technical attributes of the new data type. For example, you could define a data type P_2 with two decimal places, based on the predefined data type P. You could then use this new type in your data declarations.
    b.  Reference Types
    Reference types are deep data types that describe reference variables, that is, data objects that contain references. A reference variable can be defined as a component of a complex data object such as a structure or internal table as well as a single field.
    c. Complex Data Types
    Complex data types are made up of other data types. A distinction is made here between structured types and table types.
    Data Objects
          Data objects are the physical units with which ABAP statements work at runtime. The contents of a data object occupy memory space in the program. ABAP statements access these contents by addressing the name of the data object and interpret them according to the data type.. For example, statements can write the contents of data objects in lists or in the database, they can pass them to and receive them from routines, they can change them by assigning new values, and they can compare them in logical expressions.
           Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type). You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
            A data object is a part of the repository whose content can be addressed and interpreted by the program. All data objects must be declared in the ABAP program and are not persistent, meaning that they only exist while the program is being executed. Before you can process persistent data (such as data from a database table or from a sequential file), you must read it into data objects first. Conversely, if you want to retain the contents of a data object beyond the end of the program, you must save it in a persistent form.
    Declaring Data Objects
          Apart from the interface parameters of procedures, you declare all of the data objects in an ABAP program or procedure in its declaration part. These declarative statements establish the data type of the object, along with any missing technical attributes. This takes place before the program is actually executed. The technical attributes can then be queried while the program is running.
         The interface parameters of procedures are generated as local data objects, but only when the procedure is actually called. You can define the technical attributes of the interface parameters in the procedure itself. If you do not, they adopt the attributes of the parameters from which they receive their values.
    ABAP contains the following kinds of data objects:
    a.  Literals
    Literals are not created by declarative statements. Instead, they exist in the program source code. Like all data objects, they have fixed technical attributes (field length, number of decimal places, data type), but no name. They are therefore referred to as unnamed data objects.
    b.  Named Data Objects
    Data objects that have a name that you can use to address the ABAP program are known as named objects. These can be objects of various types, including text symbols, variables and constants.
    Text symbols are pointers to texts in the text pool of the ABAP program. When the program starts, the corresponding data objects are generated from the texts stored in the text pool. They can be addressed using the name of the text symbol.
    Variables are data objects whose contents can be changed using ABAP statements. You declare variables using the DATA, CLASS-DATA, STATICS, PARAMETERS, SELECT-OPTIONS, and RANGESstatements.
    Constants are data objects whose contents cannot be changed. You declare constants using the CONSTANTSstatement.
    c.  Anonymous Data  Objects
    Data objects that cannot be addressed using a name are known as anonymous data objects. They are created using the CREATE DATAstatement and can be addressed using reference variables.
    d.  System-Defined Data Objects
    System-defined data objects do not have to be declared explicitly - they are always available at runtime.
    e.  Interface Work Areas
    Interface work areas are special variables that serve as interfaces between programs, screens, and logical databases. You declare interface work areas using the TABLES and NODESstatements.
    What is the difference between Type and Like?
    Answer1:
    TYPE, you assign datatype directly to the data object while declaring.
    LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.
    Answer2:
    Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object.
    Answer3:
    type refers the existing data type
    like refers the existing data object
    reward if useful
    thanks and regards
    suma sailaja pvn

  • Applying a query language to collections

    Hi, we handed in a project a while ago that was essentially to read in data from a .DAT file, store it in appropriate collections, then use a basic query language to filter through the stored data. I wasn't really happy with my querying though, as it was basically a huge succession of control statements. The queries were of the form "select OBJECTNAME where ATRIBUTE OPERATOR VALUE and ATRIBUTE OPERATOR VALUE", there could be as many sub clauses as desired (0... 200 whatever). For example "select elephant where height > 360 and weight <= 1000".
    We had a comment back that we should use a Query interface and a two subclasses to represent a simple query (e.g. height > 360) and then a conjunctive query (ie simplequery1 AND simplequery2 ). The Query interface would then have a match method. I'm struggling to get my head around how I do this, does anyone have a simple example or explaination that might help me out?
    Cheers.

    I've done something like this a couple times. Your need to get a better idea of what you want your query language to look like. For example, if you're given a list of elephants, the "select elephant" part is unnecessary (your query will just return a list of matching elephants). You should decide if you want it to handle things like (height > (weight / 2)), whether conditions can be nested "((a and b) or (c and d)) and (e or f)". Will you need to support the conditional operator (a ? b : c) or a unary operator (-)? How complex will your order of operations rules be?
    If you keep it simple (always two operands), you could go with something like this:
    public interface QueryOperator
      public boolean eval(Object leftParam, Object rightParam);
    public enum BasicOperators implements QueryOperator
    public class  QueryElement
      private QueryOperator operator;
      private Object leftParam;
      private Object rightParam;
    }

  • Like Phrase DW query not working

    I'm using the DW Recordset Query to search the news table,
    filtering where story CONTAINS form variable Request.search
    here is my page code, the input textfield has a dynamic
    Request Variable called search that I dragged onto this textfield.
    I hoped that my query would filter the news full STORY by whatever
    the user enters into the textfield.
    In Simple mode of the Recordset Dialog box it works
    perfectly, it asks me to enter a test value and I get accurate
    results BUT when I toggle over to the Advanced view of the same
    Recordset Dialog box and try test I do not get a chance to enter a
    value but always get 4 out of 7 results. When I upload it live I
    get the 4 results no matter what I type in text field.
    Code attached and thank you
    Jim

    Hi Jim,
    jimkemble wrote:
    > I'm using the DW Recordset Query to search the news
    table, filtering where
    > story CONTAINS form variable Request.search
    >
    > here is my page code, the input textfield has a dynamic
    Request Variable
    > called search that I dragged onto this textfield. I
    hoped that my query would
    > filter the news full STORY by whatever the user enters
    into the textfield.
    >
    > In Simple mode of the Recordset Dialog box it works
    perfectly, it asks me to
    > enter a test value and I get accurate results BUT when I
    toggle over to the
    > Advanced view of the same Recordset Dialog box and try
    test I do not get a
    > chance to enter a value but always get 4 out of 7
    results. When I upload it
    > live I get the 4 results no matter what I type in text
    field.
    When you go into advanced view, the value that you enter is
    the default
    for MMColParam. In your case its the number 1. During
    testing, enter
    your test value in the default value field of MMColParam, but
    once your
    done, use something that you hope to never have, like -1.
    Steve
    > Code attached and thank you
    > Jim
    >
    > <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    > <!--#include
    file="../Connections/orig_lcba_connection.asp" -->
    > <%
    > Dim rsKeyword__MMColParam
    > rsKeyword__MMColParam = "1"
    > If (Request.Form("Request.search") <> "") Then
    > rsKeyword__MMColParam = Request.Form("Request.search")
    > End If
    > %>
    > <%
    > Dim rsKeyword
    > Dim rsKeyword_cmd
    > Dim rsKeyword_numRows
    >
    > Set rsKeyword_cmd = Server.CreateObject
    ("ADODB.Command")
    > rsKeyword_cmd.ActiveConnection =
    MM_orig_lcba_connection_STRING
    > rsKeyword_cmd.CommandText = "SELECT * FROM news WHERE
    story LIKE ?"
    > rsKeyword_cmd.Prepared = true
    > rsKeyword_cmd.Parameters.Append
    rsKeyword_cmd.CreateParameter("param1", 200,
    > 1, 255, "%" + rsKeyword__MMColParam + "%") ' adVarChar
    >
    > Set rsKeyword = rsKeyword_cmd.Execute
    > rsKeyword_numRows = 0
    > %>
    > <%
    > Dim Repeat1__numRows
    > Dim Repeat1__index
    >
    > Repeat1__numRows = -1
    > Repeat1__index = 0
    > rsKeyword_numRows = rsKeyword_numRows + Repeat1__numRows
    > %>
    > <%
    >
    > Repeat1__numRows = 10
    > Repeat1__index = 0
    > rsKeyword_numRows = rsKeyword_numRows + Repeat1__numRows
    > %>
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    > <title>Untitled Document</title>
    > </head>
    >
    > <body>
    > <table width="650" border="0" cellspacing="0"
    cellpadding="0">
    > <tr>
    > <td><form id="form1" name="form1" method="get"
    action="kw_search_jim.asp">
    > <input name="search" type="text" id="search"
    value="<%= Request("search")
    > %>" />
    > <br />
    > <input type="submit" value="Search" />
    > </form> </td>
    > <td> </td>
    > </tr>
    > </table>
    > <p> </p>
    >
    > <table border="1">
    > <tr>
    > <td>newsDate</td>
    > <td>title</td>
    > <td>story</td>
    > <td>author</td>
    > </tr>
    > <% While ((Repeat1__numRows <> 0) AND (NOT
    rsKeyword.EOF)) %>
    > <tr>
    > <td
    valign="top"><%=(rsKeyword.Fields.Item("newsDate").Value)%></td>
    > <td
    valign="top"><%=(rsKeyword.Fields.Item("title").Value)%></td>
    >
    <td><%=(rsKeyword.Fields.Item("story").Value)%></td>
    > <td
    valign="top"><%=(rsKeyword.Fields.Item("author").Value)%></td>
    > </tr>
    > <%
    > Repeat1__index=Repeat1__index+1
    > Repeat1__numRows=Repeat1__numRows-1
    > rsKeyword.MoveNext()
    > Wend
    > %>
    > </table>
    > </body>
    > </html>
    > <%
    > rsKeyword.Close()
    > Set rsKeyword = Nothing
    > %>
    >

  • EJB query language help!!

    Hi all, I have been trying to run a ejb query on JBoss 4.0.5, using built in hypersonic db, For some strange reasons am able to fetch all objects from db without any where clause but if am using a where clause with an attribute name from the entitybean am unable to retrieve any results.
    I get an org.hibernate.QueryException, could not resolve property : "property name"
    My ejb query looks like this...
    SELECT template FROM TemplateSelect template WHERE template.template_name='Template_One'
    TemplateSelect is my entity bean class and I do have an attribute named template_name in my bean class.
    could any one please suggest me what could be wrong and also direct me to a good tutorial on ejb query language as well as I am fairly new to hibernate and ejb3 !
    tons of thanks in advance!
    pravin

    Hi Anuradha ,
    I'm afraid the query language does not support retrieving the date portion (i.e. truncating the time) from a date field.
    I propose you turn you named into a BETWEEN query taking two parameters one for the beginning of the day and another for the end of the day. Then your named query could look like:
    SELECT max(o.req_id) FROM requests o WHERE o.requestdate BETWEEN :start AND :end
    The following code creates two calendar instances for the current day, one for 00:00:00 and another for 23:59:59:
    Calendar start = Calendar.getInstance();
    start.set(Calendar.HOUR_OF_DAY, 0);
    start.set(Calendar.MINUTE, 0);
    start.set(Calendar.SECOND, 0);
    start.set(Calendar.MILLISECOND, 0);
    Calendar end = Calendar.getInstance();
    end.set(Calendar.HOUR_OF_DAY, 23);
    end.set(Calendar.MINUTE, 59);
    end.set(Calendar.SECOND, 59);
    end.set(Calendar.MILLISECOND, 999);
    Here is some sample code that creates a query instance for a named query called findMaxRequestPerDay and passes the Date of the above Calendar instance as actual parameter values. It assumes the named query is called findMaxRequestPerDay and the req_id field is a long:
    Query query = em.createNamedQuery("findMaxRequestPerDay");
    query.setParameter("start", start.getTime());
    query.setParameter("end", end.getTime());
    Long max = (Long)query.getSingleResult();
    I hope this helps.
    Regards Michael

Maybe you are looking for

  • Clean install vs. time machine recovery after installing new HDD

    Hello All, I have got actually two questions, but I think I only can do one issue at the time. Anyway: Here are my specs and question: 1. I have got a 2010 MacBook Pro with a 320 Gb HDD which seems to be on its way to lala land (crashes almost once e

  • Service cost to be included into Material value.

    Dear Expert, 1. Purchase order has been created for "XXX" material - Value of 1000 - Quantity 10, GRN & Invoice has been booked.    Now my material valuation price is 1000 * 10 = 10000 2. Service PO has been raised to make alteration in same "XXX" ma

  • How to write nested cursor for Adv. Collections dunning letter query

    I am trying to write a query for Advanced Collections duninng letters. Some accounts for this customer have invoices for more than one currency. In order to find all of the invoices this query works: select to_char(sysdate, 'MM/DD/YYYY') currsysdate,

  • Reconstruction

    Hi experts Purchasing infosources 2lis_02_HDR and ITM are supplying data into a data target cube. We did init upload for both the sources. Firstly we did the 2LIS_02_ITM and then did 2LIS_02_ITM. Do we face any problems by doing this way..usually fir

  • Parallel Query/Execution

    Guys, What is parallel quering/execution? How does it help to improve the performance. Thanks