Link to home
Start Free TrialLog in
Avatar of rutgermons
rutgermons

asked on

oracle, 10, database, query by year and week in oracle

folks

how do i run a serach in oracle against a year and a week?

i.e  select * from table where year ='2008' and week is '21'
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

I assume you have a column that has date or timestamp data type?
is the field indexed?

you could use the TO_CHAR() function:
http://www.techonthenet.com/oracle/functions/to_char.php

however, if you could determine the start and end date of the week, it should be easier...
ASKER CERTIFIED SOLUTION
Avatar of msram78
msram78

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial