By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,508 Members | 2,904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,508 IT Pros & Developers. It's quick & easy.

REQ: Simple Query

P: n/a
Dan
Hi all! I am creating a Disney "Today in History" database, and so
far have about 300 entries in it. Well, my Access database is great,
and my Frontpage form is great, but I want to include a short "On this
date in Disney history....<event>" on my main web page. Basically,
if someone goes to my web page, they'll automatically see this if
there is an event that occurred on this day.

So, my problem is... how do I create an SQL database that shows ONLY
the events from today? Like, "On September 4, 1931, Walt
Disney...yadda yadda yadda." My SQL query must be wrong because
nothing is getting displayed for events on days that I KNOW there are
events.

Here is my query...

SELECT * FROM Results WHERE (Month = '::Month::' AND Day =
'::Day::')

This doesn't display any events on the day I choose (and I've changed
the date a few times on my computer to match days that have data in
them). Can someone help me to make a query that might work to display
the results of the Month and Day only? (They're both separate fields
in my access database).

If you want to check it out, go to http://www.bbdisney.com/tih.asp

Thanks!
Dan

da*******@NOSPAMshaw.ca

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Basically without seeing your table that you are querying, the easiest
solution I have for you is to create a query using the query wizard,
then open it and put in the criteria in the query. If you get results,
then open the query in SQL format and you will see the SQL statement
that you need.

Hope this helps.

John
Dan <da***@shaw.ca> wrote in message news:<mj********************************@4ax.com>. ..
Hi all! I am creating a Disney "Today in History" database, and so
far have about 300 entries in it. Well, my Access database is great,
and my Frontpage form is great, but I want to include a short "On this
date in Disney history....<event>" on my main web page. Basically,
if someone goes to my web page, they'll automatically see this if
there is an event that occurred on this day.

So, my problem is... how do I create an SQL database that shows ONLY
the events from today? Like, "On September 4, 1931, Walt
Disney...yadda yadda yadda." My SQL query must be wrong because
nothing is getting displayed for events on days that I KNOW there are
events.

Here is my query...

SELECT * FROM Results WHERE (Month = '::Month::' AND Day =
'::Day::')

This doesn't display any events on the day I choose (and I've changed
the date a few times on my computer to match days that have data in
them). Can someone help me to make a query that might work to display
the results of the Month and Day only? (They're both separate fields
in my access database).

If you want to check it out, go to http://www.bbdisney.com/tih.asp

Thanks!
Dan

da*******@NOSPAMshaw.ca

Nov 12 '05 #2

P: n/a
Hey Dan,
Do you have a table called Results in your database? You can create a
stored procedure or query whih accepts parameters . You can the feed
the query with the reqd params from your ASP page orVisual Basic form.
You SQL seems to be right, if ::Dy:: and ::Month:: are the variables
you are trying to accept!
Hope this helps,
Yegnaram Iyer
www.geocities.com/yegnaramiyer
Dan <da***@shaw.ca> wrote in message news:<mj********************************@4ax.com>. ..
Hi all! I am creating a Disney "Today in History" database, and so
far have about 300 entries in it. Well, my Access database is great,
and my Frontpage form is great, but I want to include a short "On this
date in Disney history....<event>" on my main web page. Basically,
if someone goes to my web page, they'll automatically see this if
there is an event that occurred on this day.

So, my problem is... how do I create an SQL database that shows ONLY
the events from today? Like, "On September 4, 1931, Walt
Disney...yadda yadda yadda." My SQL query must be wrong because
nothing is getting displayed for events on days that I KNOW there are
events.

Here is my query...

SELECT * FROM Results WHERE (Month = '::Month::' AND Day =
'::Day::')

This doesn't display any events on the day I choose (and I've changed
the date a few times on my computer to match days that have data in
them). Can someone help me to make a query that might work to display
the results of the Month and Day only? (They're both separate fields
in my access database).

If you want to check it out, go to http://www.bbdisney.com/tih.asp

Thanks!
Dan

da*******@NOSPAMshaw.ca

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.