Click here to Skip to main content
15,889,315 members
Home / Discussions / Database
   

Database

 
GeneralRe: sql server instalation Pin
Jerry Hammond28-Nov-08 8:08
Jerry Hammond28-Nov-08 8:08 
GeneralRe: sql server instalation Pin
Wendelius28-Nov-08 8:34
mentorWendelius28-Nov-08 8:34 
AnswerRe: sql server instalation Pin
Jerry Hammond28-Nov-08 8:10
Jerry Hammond28-Nov-08 8:10 
QuestionSqlserver error of date difference Pin
snehasish28-Nov-08 2:25
snehasish28-Nov-08 2:25 
AnswerRe: Sqlserver error of date difference Pin
Wendelius28-Nov-08 3:43
mentorWendelius28-Nov-08 3:43 
GeneralRe: Sqlserver error of date difference Pin
snehasish28-Nov-08 18:25
snehasish28-Nov-08 18:25 
GeneralRe: Sqlserver error of date difference Pin
Wendelius28-Nov-08 20:40
mentorWendelius28-Nov-08 20:40 
QuestionVerify my understanding Pin
Syed Mehroz Alam27-Nov-08 22:18
Syed Mehroz Alam27-Nov-08 22:18 
Given the T-SQL statments below, it seems that the statements do nothing other than splitting the @MinDate and @MaxDate into day, month and year and then recreating it. Before deleting this portion, can you people verify that I am not missing any perspective.


select @MinDate = min(TheDate) from tDate where TheDate > convert(datetime,'01-01-1980',105)
select @MaxDate = max(TheDate) from tDate


--The following statements are not doing anything meaningful, I believe.

set @Year = datepart(yyyy,@MinDate)
set @Month = datepart(mm,@MinDate)
set @Day = datepart(d,@MinDate)

if len(@Month) = 1
begin
  set @Month = '0'+@Month
end

if len(@Day) = 1
begin
  set @Day = '0'+@Day
end

set @MinDate = convert(datetime,@Day+'-'+@Month+'-'+@Year,105)

set @Year = datepart(yyyy,@MaxDate)
set @Month = datepart(mm,@MaxDate)
set @Day = datepart(d,@MaxDate)

if len(@Month) = 1
begin
  set @Month = '0'+@Month
end

if len(@Day) = 1
begin
  set @Day = '0'+@Day
end

set @MaxDate = convert(datetime,@Day+'-'+@Month+'-'+@Year,105)


Regards,
Syed Mehroz Alam

My Blog
My Articles

Computers are incredibly fast, accurate, and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination. - Albert Einstein

AnswerRe: Verify my understanding Pin
Steve Westbrook1-Dec-08 5:52
Steve Westbrook1-Dec-08 5:52 
GeneralRe: Verify my understanding Pin
Ben Fair3-Dec-08 4:08
Ben Fair3-Dec-08 4:08 
QuestionOleDb? Pin
dec8227-Nov-08 15:46
dec8227-Nov-08 15:46 
AnswerRe: OleDb? Pin
Jerry Hammond27-Nov-08 15:55
Jerry Hammond27-Nov-08 15:55 
GeneralRe: OleDb? Pin
dec8227-Nov-08 17:55
dec8227-Nov-08 17:55 
AnswerRe: OleDb? Pin
Wendelius28-Nov-08 4:19
mentorWendelius28-Nov-08 4:19 
GeneralXQuery Issue Pin
Brady Kelly27-Nov-08 7:08
Brady Kelly27-Nov-08 7:08 
GeneralRe: XQuery Issue Pin
Wendelius27-Nov-08 7:31
mentorWendelius27-Nov-08 7:31 
GeneralRe: XQuery Issue Pin
Brady Kelly27-Nov-08 7:39
Brady Kelly27-Nov-08 7:39 
GeneralRe: XQuery Issue Pin
Wendelius27-Nov-08 7:48
mentorWendelius27-Nov-08 7:48 
GeneralRe: XQuery Issue Pin
Brady Kelly27-Nov-08 7:56
Brady Kelly27-Nov-08 7:56 
Questionimport from excel Pin
tkoletsis27-Nov-08 5:15
tkoletsis27-Nov-08 5:15 
AnswerRe: import from excel Pin
Wendelius27-Nov-08 5:56
mentorWendelius27-Nov-08 5:56 
QuestionIssue with Reporting services Pin
Sandeep Akhare27-Nov-08 4:41
Sandeep Akhare27-Nov-08 4:41 
AnswerRe: Issue with Reporting services [modified] Pin
Jerry Hammond27-Nov-08 15:49
Jerry Hammond27-Nov-08 15:49 
GeneralRe: Issue with Reporting services Pin
Sandeep Akhare27-Nov-08 15:56
Sandeep Akhare27-Nov-08 15:56 
GeneralRe: Issue with Reporting services Pin
Jerry Hammond27-Nov-08 17:50
Jerry Hammond27-Nov-08 17:50 

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.