|
|
Subject:
SQL Statement
Category: Computers > Programming Asked by: fdic-ga List Price: $5.00 |
Posted:
19 Mar 2005 11:15 PST
Expires: 19 Mar 2005 17:51 PST Question ID: 497249 |
I am trying to write a query in SQL. The application (Access)has a date range input box that asks what date range i am interested in. The format is standard MM/DD/YYYY. The SQL data base that I am querying is set up with two fields Expense_Yr and Expense_Month (notice no day and dates are parsed out to seperate columns). How do I get my query to convert the standard date to two seperate criteria? |
|
There is no answer at this time. |
|
Subject:
Re: SQL Statement
From: crythias-ga on 19 Mar 2005 12:44 PST |
You could set your criteria to be where Expense_Month=Month(submitted date) and Expense_Year=Year(submitted date)... "Month" and "Year" functions being relative to the ability of your SQL server to parse those functions... |
Subject:
Re: SQL Statement
From: nelson-ga on 19 Mar 2005 17:05 PST |
You should consider changing how you are storing the data in Access. I suggest using a integer field and storing the data as yyyymm. March 2005 would be 200503. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |