Click here to Skip to main content
16,005,080 members
Home / Discussions / Database
   

Database

 
AnswerRe: smalldatetime and data; how to get them to cooperate!? Pin
Mark J. Miller9-Apr-08 4:11
Mark J. Miller9-Apr-08 4:11 
GeneralRe: smalldatetime and data; how to get them to cooperate!? Pin
Daniel_Logan9-Apr-08 4:21
Daniel_Logan9-Apr-08 4:21 
AnswerRe: smalldatetime and data; how to get them to cooperate!? Pin
Ashfield9-Apr-08 21:37
Ashfield9-Apr-08 21:37 
GeneralRe: smalldatetime and data; how to get them to cooperate!? Pin
Daniel_Logan9-Apr-08 22:05
Daniel_Logan9-Apr-08 22:05 
GeneralRe: smalldatetime and data; how to get them to cooperate!? Pin
Ashfield10-Apr-08 1:44
Ashfield10-Apr-08 1:44 
GeneralRe: smalldatetime and data; how to get them to cooperate!? Pin
Daniel_Logan10-Apr-08 4:02
Daniel_Logan10-Apr-08 4:02 
QuestionUrgent:Data Purging of previous month Pin
rockz...9-Apr-08 1:17
rockz...9-Apr-08 1:17 
GeneralRe: Urgent:Data Purging of previous month Pin
Ashfield9-Apr-08 1:43
Ashfield9-Apr-08 1:43 
I assume you have some kind of added date on your table(s), otherwise how will youi know the age of the data, but anyway:

delete tablea<br />
where addeddate < dateadd(month,-1,getdate())


This will delete anything over 1 month old today. Its easy enough to work on a month end/month start basis, I'll leave that for you to work out.

Also, if you have referential integrity between table you need to do the deletes in the correct order.

Bob
Ashfield Consultants Ltd

GeneralRe: Urgent:Data Purging of previous month Pin
Christian Graus9-Apr-08 2:15
protectorChristian Graus9-Apr-08 2:15 
GeneralDTS error display Pin
Amit Baheti9-Apr-08 1:10
Amit Baheti9-Apr-08 1:10 
GeneralRe: DTS error display Pin
SimulationofSai9-Apr-08 7:59
SimulationofSai9-Apr-08 7:59 
QuestionMerging row data Pin
siddy178-Apr-08 23:57
siddy178-Apr-08 23:57 
GeneralRe: Merging row data Pin
Mark J. Miller9-Apr-08 4:30
Mark J. Miller9-Apr-08 4:30 
Questionhow to know whether the string is having to_char or not in oracle Pin
lakshmichawala8-Apr-08 21:20
lakshmichawala8-Apr-08 21:20 
GeneralMy query does not have an error but returns no value Pin
Daniel_Logan8-Apr-08 21:04
Daniel_Logan8-Apr-08 21:04 
GeneralRe: My query does not have an error but returns no value Pin
Christian Graus8-Apr-08 21:27
protectorChristian Graus8-Apr-08 21:27 
GeneralRe: My query does not have an error but returns no value Pin
Daniel_Logan8-Apr-08 22:33
Daniel_Logan8-Apr-08 22:33 
GeneralRe: My query does not have an error but returns no value Pin
Ashfield9-Apr-08 1:45
Ashfield9-Apr-08 1:45 
GeneralRe: My query does not have an error but returns no value Pin
Daniel_Logan9-Apr-08 2:17
Daniel_Logan9-Apr-08 2:17 
GeneralRe: My query does not have an error but returns no value Pin
Ashish Sehajpal9-Apr-08 3:44
Ashish Sehajpal9-Apr-08 3:44 
QuestionHow to delete then set the identity of a SQL table Pin
samerh8-Apr-08 20:12
samerh8-Apr-08 20:12 
AnswerRe: How to delete then set the identity of a SQL table Pin
John_Adams8-Apr-08 22:53
John_Adams8-Apr-08 22:53 
AnswerRe: How to delete then set the identity of a SQL table Pin
SimulationofSai9-Apr-08 8:08
SimulationofSai9-Apr-08 8:08 
GeneralCreate Index with 2 columns (Ignoring when col 1 =0) Pin
AlexeiXX38-Apr-08 11:23
AlexeiXX38-Apr-08 11:23 
GeneralRe: Create Index with 2 columns (Ignoring when col 1 =0) Pin
Blue_Boy8-Apr-08 11:31
Blue_Boy8-Apr-08 11:31 

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.