Wednesday, March 28, 2012

One Date field with different dates

I want to search on a date field with user input. How can I make it to where
it will give user a startdate and an enddate box? Remember I have only one
date field.
SELECT COURSE_NBR, ATTEND, COMPL_DATE
FROM EH_MEMINFO_1
WHERE (COURSE_NBR LIKE @.COURSE_NBR) or
(COMPL_DATE LIKE @.COMPL_DATE)
Thanks fo ryour help.Use this:
SELECT COURSE_NBR, ATTEND, COMPL_DATE
FROM EH_MEMINFO_1
WHERE (COURSE_NBR LIKE @.COURSE_NBR) or
(COMPL_DATE BETWEEN @.StartDate AND @.EndDate)
"Shan" wrote:
> I want to search on a date field with user input. How can I make it to where
> it will give user a startdate and an enddate box? Remember I have only one
> date field.
> SELECT COURSE_NBR, ATTEND, COMPL_DATE
> FROM EH_MEMINFO_1
> WHERE (COURSE_NBR LIKE @.COURSE_NBR) or
> (COMPL_DATE LIKE @.COMPL_DATE)
> Thanks fo ryour help.|||O Thank you soo much...that solved lots of problems.
Great Daw!
"daw" wrote:
> Use this:
> SELECT COURSE_NBR, ATTEND, COMPL_DATE
> FROM EH_MEMINFO_1
> WHERE (COURSE_NBR LIKE @.COURSE_NBR) or
> (COMPL_DATE BETWEEN @.StartDate AND @.EndDate)
>
> "Shan" wrote:
> > I want to search on a date field with user input. How can I make it to where
> > it will give user a startdate and an enddate box? Remember I have only one
> > date field.
> >
> > SELECT COURSE_NBR, ATTEND, COMPL_DATE
> > FROM EH_MEMINFO_1
> > WHERE (COURSE_NBR LIKE @.COURSE_NBR) or
> > (COMPL_DATE LIKE @.COMPL_DATE)
> >
> > Thanks fo ryour help.

No comments:

Post a Comment