Weekly question - integrity checks

2002-10-14 Thread Candace Cottrell
I am wrapping up a Question of the Week application today, and while doing my checks, I cam across an issue. My database is like: QOW_Start (datetime) QOW_End (datetime) QOW_Text QOW_Type Ok, so say I have the following data: 10/11/2002 10/11/2002 Testing the system. all I am checking in the

RE: Weekly question - integrity checks

2002-10-14 Thread Andy Clary
validation code running after the query. Wouldn't you want the validation to take place before the query? Andy -Original Message- From: Candace Cottrell [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 7:27 AM To: CF-Talk Subject: Weekly question - integrity checks I am wrapping up

RE: Weekly question - integrity checks

2002-10-14 Thread Everett, Al
I think you have an expression ordering issue. SQL evaluates ANDs before ORs, so you're getting all records QOW_Start = '#StartDate#' as well as all records where QOW_End = '#EndDate#' AND QOW_Type = '#form.type#' Try changing your WHERE clause to: Where ( QOW_Start = '#StartDate#'

RE: Weekly question - integrity checks

2002-10-14 Thread Mark A. Kruger - CFG
ensure that you are getting exactly what you intended :) -mk -Original Message- From: Candace Cottrell [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 9:27 AM To: CF-Talk Subject: Weekly question - integrity checks I am wrapping up a Question of the Week application today

RE: Weekly question - integrity checks

2002-10-14 Thread Candace Cottrell
Ewww yes, I see what you mean. Now, I also see another problem. The range isn't being properly identified. For example, I'm saying Where QOW_Start is less than or equal to 10/13 -- so this is returning true because the data in the db is 10/11 or Where QOW_end is greater than or

RE: Weekly question - integrity checks

2002-10-14 Thread Everett, Al
:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 10:48 AM To: CF-Talk Subject: RE: Weekly question - integrity checks Ewww yes, I see what you mean. Now, I also see another problem. The range isn't being properly identified. For example, I'm saying Where QOW_Start is less than

RE: Weekly question - integrity checks

2002-10-14 Thread Candace Cottrell
to or later than your start date. QOW_Start = '#EndDate#' OR QOW_End = '#StartDate#' -Original Message- From: Candace Cottrell [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 10:48 AM To: CF-Talk Subject: RE: Weekly question - integrity checks Ewww yes, I see what you mean

Re: Weekly question - integrity checks

2002-10-14 Thread Jochem van Dieten
Candace Cottrell wrote: Ewww yes, I see what you mean. Now, I also see another problem. The range isn't being properly identified. Hmm, if you are only entering dates, why timestamp instead of date? For your problem, if your database supports it, use OVERLAPS: SELECT * FROMQOW