sudhakarpothu
Programmer
Hello Friends,
I have a problem with retreiving data from my oracle database using sql select statement.
here I am using a user form in vb to get the data from a begining date to ending date, my database has different coloumns for Year, month and Day
I am using six variables to get the values for begining and end of year, month and day
Byear for beging year
Eyear for end year....................etc
so when i use the sql select statement
select Year, Month, Day from table where Year>='" & Byear & "' and Year <='" & Eyear & "' and Month>='" & Bmonth & "' and Month<='" & Emonth & "' and Day>='" & Bday & "' and Day<='" & Eday & "'"
it is giving me only part of data
for example if i take begining year as 2005 month 11 and day 1 to end year 2006 month 12 and day 30
it giving me data for only 2005-11-1 to 30 and 2006-12-1 to 30 but not for all months and dates between 2005 and 2006
please write me if anyone know the solution for this problem may be a nested select statement or something.
sorry for taking your valuable time
Thank you.
Sudhakar Pothu.
I have a problem with retreiving data from my oracle database using sql select statement.
here I am using a user form in vb to get the data from a begining date to ending date, my database has different coloumns for Year, month and Day
I am using six variables to get the values for begining and end of year, month and day
Byear for beging year
Eyear for end year....................etc
so when i use the sql select statement
select Year, Month, Day from table where Year>='" & Byear & "' and Year <='" & Eyear & "' and Month>='" & Bmonth & "' and Month<='" & Emonth & "' and Day>='" & Bday & "' and Day<='" & Eday & "'"
it is giving me only part of data
for example if i take begining year as 2005 month 11 and day 1 to end year 2006 month 12 and day 30
it giving me data for only 2005-11-1 to 30 and 2006-12-1 to 30 but not for all months and dates between 2005 and 2006
please write me if anyone know the solution for this problem may be a nested select statement or something.
sorry for taking your valuable time
Thank you.
Sudhakar Pothu.