SSH中HQL语句:from Funct where code like '%"+id+"%' 只能查出一部分数据前5个
select * from funct where code like 'SS%'  能够把带SS中的全部读出来  
为何?纠结中!请高手....

解决方案 »

  1.   

    from Funct f where f.code like '%"+id+"%'
    试试
      

  2.   


    String sql = "select * from Funct where code like '%" + id + "%'";你再试试呢,应该没问题的
      

  3.   

    Company 
    这是读出放在页面上的
    Users 
    Menu 
    Function 
    UserRights 
      

  4.   

    Company
    Users
    Menu
    Function
    UserRights
    Department
    Employee
    HSCode
    Commodity
    CommodityType
    Warehouse
    Currency
    Type of collecting
    Manner of Collecting
    Type of Payments
    Type of Trading
    Price Clause
    Expense Item
    Continent
    City
    Port
    Transportation
    Mode of Transportation
    Express Company
    Shipping Document
    Insurance Company
    Insurance Clause
    Insrance Claims
    Customs
    Negotiating Bank
    Issuing Bank
    Accreditor
    Beneficiary
    Approve Rights
    Country
    这是那个在数据库中sql语句出来的
      

  5.   

    你那个%of%是只能查询出of在中间的数据的
      

  6.   

    看我显示数据的代码也无错啊,<%List functList = (List)request.getAttribute("functList"); 
    Funct f=null;
    if(functList!=null)
    {
    for(int i=0;i<functList.size();i++)
    {
    f=(Funct)functList.get(i);
    %>
    <tr>
    <td><%=f.getEnname()%></td>
    </tr>
     <%}
     }%>
    我纳闷了,数据表总共5列,我要其中的一列数据全部显示,却只显示5个....
      

  7.   

    我在SQL2000中模糊查询得到所有我要的数据
    在SSH项目Dao中模糊查询,却只能到列数一样多的个数的记录,为何
      

  8.   


    Java code
    SSH中HQL语句:from Funct where code like '%"+id+"%' 只能查出一部分数据前5个你的id如果是数字的话它只会查找code中包含id这个数字的数据
     
      

  9.   


    M1F01    
    M1F02
    M1F03
    M1F04
    M1F05
    M1F06
    M1F07
    M1F08
    M1F09
    上面对应的列
    Company
    Users
    Menu
    Function
    UserRights
    Department
    Employee
    HSCode
    Commodity
      

  10.   

    传进去的id为M1F,却只能出5个数字,跟表的列数一样