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

Database

 
GeneralSql Server - MS Access Pin
Timothy_198211-May-05 3:59
Timothy_198211-May-05 3:59 
GeneralRe: Sql Server - MS Access Pin
jasncab11-May-05 6:09
jasncab11-May-05 6:09 
GeneralData Type problem in SQL server 2000 Pin
imshally8111-May-05 2:27
imshally8111-May-05 2:27 
GeneralRe: Data Type problem in SQL server 2000 Pin
Colin Angus Mackay11-May-05 2:46
Colin Angus Mackay11-May-05 2:46 
GeneralRe: Data Type problem in SQL server 2000 Pin
imshally8111-May-05 20:43
imshally8111-May-05 20:43 
GeneralRe: Data Type problem in SQL server 2000 Pin
Colin Angus Mackay11-May-05 21:10
Colin Angus Mackay11-May-05 21:10 
GeneralRe: Data Type problem in SQL server 2000 Pin
imshally8111-May-05 21:18
imshally8111-May-05 21:18 
GeneralDateTime between two times Pin
Michael P Butler11-May-05 0:07
Michael P Butler11-May-05 0:07 
I have a table on an SQLServer 2000 box with a DateTime field called CallTime.

I want to select all the records between 19:00 and 06:59 over a period of days

Is there a more efficent way of doing the select in a stored procedure than this,

WHERE (DATEPART(hh, dbo.JobData.calltime) * 60 + DATEPART(mi, dbo.JobData.calltime) BETWEEN 
DATEPART(hh, '19:00') * 60 + DATEPART(mi, '19:00') AND DATEPART(hh, '23:59') * 60 + DATEPART(mi, 
'23:59')) OR (DATEPART(hh, dbo.JobData.calltime) * 60 + DATEPART(mi, dbo.JobData.calltime) BETWEEN 
DATEPART(hh, '00:00') * 60 + DATEPART(mi, '00:00') AND DATEPART(hh, '06:59') * 60 + DATEPART(mi, 
'06:59'))


Michael

CP Blog [^] Development Blog [^]

GeneralRe: DateTime between two times Pin
Colin Angus Mackay11-May-05 2:48
Colin Angus Mackay11-May-05 2:48 
GeneralRe: DateTime between two times Pin
Michael P Butler11-May-05 3:12
Michael P Butler11-May-05 3:12 
GeneralRe: DateTime between two times Pin
Colin Angus Mackay11-May-05 3:15
Colin Angus Mackay11-May-05 3:15 
GeneralRe: DateTime between two times Pin
Michael P Butler11-May-05 3:26
Michael P Butler11-May-05 3:26 
GeneralRe: DateTime between two times Pin
Chris Meech11-May-05 9:20
Chris Meech11-May-05 9:20 
Generaldatabase Design Pin
imshally8110-May-05 23:59
imshally8110-May-05 23:59 
GeneralRe: database Design Pin
Anonymous11-May-05 0:22
Anonymous11-May-05 0:22 
GeneralRe: database Design Pin
hp10811-May-05 0:37
hp10811-May-05 0:37 
GeneralIF Statement with in Query Pin
si_6910-May-05 7:23
si_6910-May-05 7:23 
GeneralRe: IF Statement with in Query Pin
Filipe Peixinho10-May-05 7:58
Filipe Peixinho10-May-05 7:58 
GeneralRe: IF Statement with in Query Pin
Member 195262810-May-05 15:03
Member 195262810-May-05 15:03 
GeneralNeed help on this query Pin
Filipe Peixinho10-May-05 6:10
Filipe Peixinho10-May-05 6:10 
GeneralRe: Need help on this query Pin
jasncab10-May-05 14:23
jasncab10-May-05 14:23 
GeneralOracleHelper Pin
Nizar Abdeljaoued10-May-05 5:30
Nizar Abdeljaoued10-May-05 5:30 
GeneralStock Update - Database Concurrency problem Pin
crowofatlantis10-May-05 1:54
crowofatlantis10-May-05 1:54 
GeneralTransact SQL Pin
Anonymous10-May-05 1:54
Anonymous10-May-05 1:54 
GeneralRe: Transact SQL Pin
Colin Angus Mackay10-May-05 3:37
Colin Angus Mackay10-May-05 3:37 

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.