Results 1 to 2 of 2

Thread: USage of Date Functions in Where Clause

  1. #1

    Question USage of Date Functions in Where Clause

    I am using a query which looks like

    Select col1, col2,
    fn_date_covert(dat_col1) - fn_date_covert(dat_col2) differnce
    From table1, table2
    where join (table1, table2)
    and fn_date_covert(dat_col1) - fn_date_covert(dat_col2) >=1;

    though this query works, but its takiling lot of time...
    I feel it is taking time bcause of Date functions in where cluse..
    Is ther any alternate method to use these date functions only in select but not in where clause..

    Thanks,
    Vijay


  2. #2
    Expert Member
    Join Date
    Apr 2007
    Answers
    500

    Re: USage of Date Functions in Where Clause

    Alternate method
    select col1,col2,difference from
    (Select col1, col2,
    fn_date_covert(dat_col1) - fn_date_covert(dat_col2) differnce
    From table1, table2
    where join (table1, table2))
    where difference >=1;


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact