Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    5

    Unanswered: Select % not working for mysqlcc?

    Hi all,

    I am having a little trouble with using the % in my query. When I do a query like this

    SELECT *
    FROM windowevents2 where ComputerName = 'Lab01' and
    Datetime = '%'

    I get a return of empty set

    But when I use this query

    SELECT *
    FROM windowevents2 where ComputerName = 'Lab01' and
    Datetime = 'Tue Feb 10 15:30:30 2004'

    I do get all the results for that search date. Any insight on why this is so? Thanks for any help.

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: Select % not working for mysqlcc?

    Originally posted by danielnwa
    Hi all,

    I am having a little trouble with using the % in my query. When I do a query like this

    SELECT *
    FROM windowevents2 where ComputerName = 'Lab01' and
    Datetime = '%'

    I get a return of empty set

    But when I use this query

    SELECT *
    FROM windowevents2 where ComputerName = 'Lab01' and
    Datetime = 'Tue Feb 10 15:30:30 2004'

    I do get all the results for that search date. Any insight on why this is so? Thanks for any help.
    Correct query is:

    SELECT *
    FROM windowevents2 where ComputerName = 'Lab01' and
    Datetime like '%'
    Because when you use "=" then the column must have exact entry.

  3. #3
    Join Date
    Feb 2004
    Posts
    5
    Thank you very much for ur help.

Posting Permissions

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