Click here to Skip to main content
15,891,943 members
Home / Discussions / Database
   

Database

 
Questionhow to change timestamp of a DB in SQL Server 2005? Pin
alexyxj2-Sep-08 6:30
alexyxj2-Sep-08 6:30 
AnswerRe: how to change timestamp of a DB in SQL Server 2005? Pin
Wendelius2-Sep-08 6:52
mentorWendelius2-Sep-08 6:52 
GeneralRe: how to change timestamp of a DB in SQL Server 2005? Pin
alexyxj2-Sep-08 6:58
alexyxj2-Sep-08 6:58 
GeneralRe: how to change timestamp of a DB in SQL Server 2005? Pin
Wendelius2-Sep-08 7:03
mentorWendelius2-Sep-08 7:03 
GeneralRe: how to change timestamp of a DB in SQL Server 2005? Pin
alexyxj2-Sep-08 7:37
alexyxj2-Sep-08 7:37 
GeneralRe: how to change timestamp of a DB in SQL Server 2005? Pin
Wendelius2-Sep-08 8:18
mentorWendelius2-Sep-08 8:18 
GeneralRe: how to change timestamp of a DB in SQL Server 2005? Pin
alexyxj2-Sep-08 10:16
alexyxj2-Sep-08 10:16 
GeneralRe: how to change timestamp of a DB in SQL Server 2005? Pin
Wendelius2-Sep-08 10:30
mentorWendelius2-Sep-08 10:30 
If it's datetime then you can simply set a desired date to the column:
UPDATE TableName SET DateTimeColumn = CONVERT(datetime, '01/01/2006', 101) ...

which will use midnight for time portion
or you can use current date and subtract desired amount of days like:
UPDATE TableName SET DateTimeColumn = GETDATE() - 975 ...

which will today end up to 01/01/2006, but using current time

FYI, if the column name would be timestamp, it is hardcoded to many libraries that is must have timestamp as data type. This will lead to problems in some cases (typically in cursor handling) if the actual datatype isn't timestamp.
GeneralRe: how to change timestamp of a DB in SQL Server 2005? Pin
alexyxj2-Sep-08 10:48
alexyxj2-Sep-08 10:48 
GeneralRe: how to change timestamp of a DB in SQL Server 2005? Pin
Wendelius2-Sep-08 10:49
mentorWendelius2-Sep-08 10:49 
QuestionTRIGGER ERROR (help me plz) Pin
Karan_TN2-Sep-08 2:55
Karan_TN2-Sep-08 2:55 
AnswerRe: TRIGGER ERROR (help me plz) Pin
Manas Bhardwaj2-Sep-08 4:40
professionalManas Bhardwaj2-Sep-08 4:40 
GeneralRe: TRIGGER ERROR (help me plz) Pin
Karan_TN2-Sep-08 5:51
Karan_TN2-Sep-08 5:51 
AnswerRe: TRIGGER ERROR (help me plz) Pin
Wendelius2-Sep-08 6:22
mentorWendelius2-Sep-08 6:22 
GeneralRe: TRIGGER ERROR (help me plz) Pin
Karan_TN3-Sep-08 20:14
Karan_TN3-Sep-08 20:14 
GeneralRe: TRIGGER ERROR (help me plz) Pin
Wendelius4-Sep-08 7:57
mentorWendelius4-Sep-08 7:57 
QuestionTRIGGER ERROR ... HELP me......... Pin
Karan_TN2-Sep-08 1:20
Karan_TN2-Sep-08 1:20 
AnswerRe: TRIGGER ERROR ... HELP me......... Pin
Blue_Boy2-Sep-08 1:29
Blue_Boy2-Sep-08 1:29 
GeneralRe: TRIGGER ERROR ... HELP me......... Pin
Karan_TN2-Sep-08 2:56
Karan_TN2-Sep-08 2:56 
QuestionThe server principal "username" is not able to access the database Pin
Krishnaraj Barvathaya B2-Sep-08 0:43
Krishnaraj Barvathaya B2-Sep-08 0:43 
AnswerRe: The server principal "username" is not able to access the database Pin
Wendelius2-Sep-08 9:16
mentorWendelius2-Sep-08 9:16 
AnswerRe: The server principal "username" is not able to access the database Pin
Krishnaraj Barvathaya B9-Sep-08 1:57
Krishnaraj Barvathaya B9-Sep-08 1:57 
QuestionDataBase compartor tool --very very urgent ....plz see with high priroty.... Pin
Samarinder2-Sep-08 0:12
Samarinder2-Sep-08 0:12 
AnswerRe: DataBase compartor tool --very very urgent ....plz see with high priroty.... Pin
Ashfield2-Sep-08 1:28
Ashfield2-Sep-08 1:28 
Questionsql variable for cursor in stored procedure Pin
vjvjvjvj1-Sep-08 22:56
vjvjvjvj1-Sep-08 22:56 

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.