DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: simple sql command

  1. #1
    Join Date
    Sep 2001
    Location
    chennai
    Posts
    69
    hi friends

    can anyone tell me the reason for this.

    when i execute the query

    select ename from emp where to_char(hiredate, 'dd-mm')=
    '17-11' ;

    iam getting the result. but when i execute the following query,

    select ename from emp where to_char(hiredate, 'dd-mon')=
    '17-NOV' ;

    no rows are selected.

    can any one expalin the reason for this.

    thanks in advance.

    regards
    swaminathan

  2. #2
    Join Date
    Mar 2001
    Location
    Reading, U.K
    Posts
    598
    the format string in TO_CHAR is case-sensitive. hence the foll. query will give the required output (using dd-MON format string).

    select ename from emp where to_char(hiredate, 'dd-MON')=
    '17-NOV' ;

    Cheers!
    OraKid.

  3. #3
    Join Date
    Sep 2001
    Location
    chennai
    Posts
    69
    thank you balajiyes for your reply

    regards
    swaminathan

Posting Permissions

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


Click Here to Expand Forum to Full Width