Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Posts
    9

    Unanswered: Like predicate problems

    Hi:

    I am trying to run a simple sql query with a like clause but it fails. The query is as listed below:

    select * from sam.change where start_date like '1%'

    the query fails with the following error:

    select * from sam.change where start_date like '1%'
    SQL0440N No authorized routine named "LIKE" of type "FUNCTION" having
    compatible arguments was found. SQLSTATE=42884

    Can someone help here.... asap

    thanks

    samit

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Like only works with strings. I am certain that start_date is DATE.

    Andy

  3. #3
    Join Date
    Nov 2004
    Posts
    374

    like

    if this is the case : try char(start_date) like '1%'
    or use date function : year.... and between
    Best Regards, Guy Przytula
    DB2/ORA/SQL Services
    DB2 DBA & Advanced DBA Certified
    DB2 Dprop Certified
    http://users.skynet.be/przytula/dbss.html

  4. #4
    Join Date
    Sep 2005
    Posts
    9

    thanks

    Yes i tried working on it yesterday and came up with the solution to use

    char (column_name) like '2%'

    Thanks.

    Samit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •