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

Database

 
GeneralRe: Creating Records based on Quant Field Pin
David Skelly13-Nov-09 2:31
David Skelly13-Nov-09 2:31 
GeneralRe: Creating Records based on Quant Field Pin
ffowler13-Nov-09 2:50
ffowler13-Nov-09 2:50 
QuestionProblem with Datepart Pin
Vimalsoft(Pty) Ltd12-Nov-09 3:10
professionalVimalsoft(Pty) Ltd12-Nov-09 3:10 
AnswerRe: Problem with Datepart Pin
J4amieC12-Nov-09 3:52
J4amieC12-Nov-09 3:52 
AnswerRe: Problem with Datepart Pin
Not Active12-Nov-09 5:36
mentorNot Active12-Nov-09 5:36 
GeneralRe: Problem with Datepart Pin
David Skelly12-Nov-09 5:42
David Skelly12-Nov-09 5:42 
GeneralRe: Problem with Datepart Pin
Not Active12-Nov-09 5:44
mentorNot Active12-Nov-09 5:44 
AnswerRe: Problem with Datepart Pin
David Skelly12-Nov-09 5:42
David Skelly12-Nov-09 5:42 
The reason you are seeing this is because the minute part of 14:00 is 0. So, you end up getting 14 for the hour part and 0 for the minute part. Hence a result of 14Blush | :O .

I agree with the previous poster, SQL is not the best place to reformat time, but sometimes the requirement is there and you have to do it. You should look into the format options of CONVERT. I think one option for you would be to convert starttime and endtime to strings using format 108 and then trim off the seconds if you don't want them.

http://msdn.microsoft.com/en-us/library/ms187928.aspx[^]

I'm also not convinced by your WHERE clause at the end. That looks to me like a potential performance killer, converting dates to do a selection like that. I may be wrong but I doubt if it will use an index for that so you will end up scanning over every row in the table.
GeneralRe: Problem with Datepart Pin
Vimalsoft(Pty) Ltd12-Nov-09 22:52
professionalVimalsoft(Pty) Ltd12-Nov-09 22:52 
QuestionChanging a column to IDENTITY Pin
garfield18511-Nov-09 22:34
garfield18511-Nov-09 22:34 
AnswerRe: Changing a column to IDENTITY Pin
Niladri_Biswas12-Nov-09 1:16
Niladri_Biswas12-Nov-09 1:16 
GeneralRe: Changing a column to IDENTITY Pin
garfield18512-Nov-09 2:41
garfield18512-Nov-09 2:41 
GeneralRe: Changing a column to IDENTITY Pin
WoutL12-Nov-09 3:05
WoutL12-Nov-09 3:05 
GeneralRe: Changing a column to IDENTITY Pin
Niladri_Biswas12-Nov-09 3:22
Niladri_Biswas12-Nov-09 3:22 
QuestionSqlConnection or what??????? i need help Pin
Mohamed El-Wehishy11-Nov-09 9:36
Mohamed El-Wehishy11-Nov-09 9:36 
NewsFree Online SQL Server 2008 R2 Developer Training Available on MSDEV Pin
brucedkyle11-Nov-09 5:56
brucedkyle11-Nov-09 5:56 
QuestionAdvice Needed - Regarding Data Transfer Between Databases On Seperate Servers [modified] Pin
It_tech11-Nov-09 4:36
It_tech11-Nov-09 4:36 
AnswerRe: Advice Needed - Regarding Data Transfer Between Databases On Seperate Servers Pin
_Damian S_11-Nov-09 13:34
professional_Damian S_11-Nov-09 13:34 
GeneralRe: Advice Needed - Regarding Data Transfer Between Databases On Seperate Servers Pin
It_tech12-Nov-09 0:44
It_tech12-Nov-09 0:44 
AnswerRe: Advice Needed - Regarding Data Transfer Between Databases On Seperate Servers Pin
Mycroft Holmes11-Nov-09 13:43
professionalMycroft Holmes11-Nov-09 13:43 
GeneralRe: Advice Needed - Regarding Data Transfer Between Databases On Seperate Servers Pin
It_tech12-Nov-09 0:39
It_tech12-Nov-09 0:39 
GeneralRe: Advice Needed - Regarding Data Transfer Between Databases On Seperate Servers Pin
Mycroft Holmes12-Nov-09 1:22
professionalMycroft Holmes12-Nov-09 1:22 
GeneralRe: Advice Needed - Regarding Data Transfer Between Databases On Seperate Servers Pin
It_tech12-Nov-09 4:12
It_tech12-Nov-09 4:12 
QuestionEfficient searching Pin
mjackson1111-Nov-09 3:28
mjackson1111-Nov-09 3:28 
AnswerRe: Efficient searching Pin
Covean11-Nov-09 5:02
Covean11-Nov-09 5:02 

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.