Hi
I am trying to construct an SQL query regarding difference in date ranges – looking for errors.
MemberID, Check, Date,
01 1 2015-1-01
01 2 2015-6-01
01 3 2015-1-01
As you can see this person has a wrong date entry’s. It a query I wish to make to return id’s with date range errors like this
Any ideas please?
khtan
2
Sorry, I don't see that. Which line is wrong ? How is it consider wrong ?
data shows
MemberID, Check, Date,
01 1 2015-1-01
01 2 2015-6-01
01 3 2015-1-01
but as you can see in question check 2 has a date in June and not January
ideally all lines should read
MemberID, Check, Date
01 1 2015-1-01
01 2 2015-1-01
01 3 2015-1-01
please help
Kristen
4
The date should ALWAYS be identical for a given MemberID?
Or they should be in same-or-increasing-date-order by the Check column?
If the first it would be better to move the date out of that table rather than duplicate it on each row (i.e. Normalisation)
bitsmed
5
Moved topic to Transact-SQL.