Click here to Skip to main content
15,892,005 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to group data which not the same ? Pin
Golden Jing16-Dec-09 14:51
Golden Jing16-Dec-09 14:51 
AnswerRe: How to group data which not the same ? Pin
Luc Pattyn16-Dec-09 15:03
sitebuilderLuc Pattyn16-Dec-09 15:03 
QuestionADODB Recordset - using ActiveX Data Object in Access 2007 Pin
john john mackey15-Dec-09 12:38
john john mackey15-Dec-09 12:38 
QuestionMS-SQL - Bulk Insert query Pin
22491715-Dec-09 11:50
22491715-Dec-09 11:50 
AnswerRe: MS-SQL - Bulk Insert query Pin
Ashfield15-Dec-09 21:01
Ashfield15-Dec-09 21:01 
GeneralRe: MS-SQL - Bulk Insert query Pin
22491716-Dec-09 6:14
22491716-Dec-09 6:14 
QuestionQuestion about using conditional SQL statement Pin
James Shao15-Dec-09 4:22
James Shao15-Dec-09 4:22 
AnswerRe: Question about using conditional SQL statement [modified] Pin
Ashfield15-Dec-09 4:34
Ashfield15-Dec-09 4:34 
An exists should do it - as far as I can tell from your description

select column_list....
from table1 t1
where indicator > 30
and exists (select 1 from table1 t2 where t2.pk = t1.pk and t2.indicator < 30 and t2.dateadded = dateadd(day,-3,t1.dateadded))


where PK is your primary key

[Edit] I had missed the date bit from the exists originally [/Edit]

Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP

modified on Tuesday, December 15, 2009 11:17 AM

GeneralRe: Question about using conditional SQL statement [modified] Pin
James Shao15-Dec-09 15:02
James Shao15-Dec-09 15:02 
GeneralRe: Question about using conditional SQL statement Pin
Ashfield15-Dec-09 20:57
Ashfield15-Dec-09 20:57 
AnswerCROSS POST Pin
dan!sh 15-Dec-09 5:08
professional dan!sh 15-Dec-09 5:08 
GeneralRe: CROSS POST Pin
James Shao15-Dec-09 12:46
James Shao15-Dec-09 12:46 
QuestionSql Doubt Pin
rajanandal15-Dec-09 2:26
rajanandal15-Dec-09 2:26 
AnswerRe: Sql Doubt Pin
Richard MacCutchan15-Dec-09 2:39
mveRichard MacCutchan15-Dec-09 2:39 
GeneralRe: Sql Doubt Pin
rajanandal15-Dec-09 2:53
rajanandal15-Dec-09 2:53 
GeneralRe: Sql Doubt Pin
dxlee15-Dec-09 4:27
dxlee15-Dec-09 4:27 
AnswerRe: Sql Doubt Pin
Niladri_Biswas15-Dec-09 15:18
Niladri_Biswas15-Dec-09 15:18 
GeneralRe: Sql Doubt Pin
rajanandal15-Dec-09 23:28
rajanandal15-Dec-09 23:28 
QuestionSQL Between Stored Proc Pin
Illegal Operation14-Dec-09 18:08
Illegal Operation14-Dec-09 18:08 
AnswerRe: SQL Between Stored Proc Pin
Niladri_Biswas14-Dec-09 18:15
Niladri_Biswas14-Dec-09 18:15 
AnswerRe: SQL Between Stored Proc Pin
Andy_L_J14-Dec-09 18:36
Andy_L_J14-Dec-09 18:36 
Questionssis script component Pin
Ebube14-Dec-09 4:24
Ebube14-Dec-09 4:24 
QuestionRe: ssis script component Pin
Unforgiv3n17-Dec-09 20:50
Unforgiv3n17-Dec-09 20:50 
QuestionCan VS support Ruby on Rails -like database migrations? Pin
GarethHowell14-Dec-09 2:40
GarethHowell14-Dec-09 2:40 
AnswerRe: Can VS support Ruby on Rails -like database migrations? Pin
i.j.russell14-Dec-09 9:07
i.j.russell14-Dec-09 9:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.