It would also help if you provided us with proper information. The SQL logic you provided does not work!
CREATE TABLE DELAYSECONDS(
ProgramID INT, ID INT, ContractHeaderID INT StationID INT ContractStartTime TIME ProgramStartTime TIME ContractDetailFirstDay INT ProgramFirstDay INT DelaySeconds INT)
INSERT INTO DELAYSECONDS
VALUES (625, 625, 115278, '0:00:00', '18:00:00', '18:00:00', 2, 2, 0),
(623, 623, 115279, '0:00:00', '8:00:00', '15:05:00', 1, NULL, 0),
(624, 624, 115280, '0:00:00', '18:00:00, '19:00:00', 7, 7, 0),
(625, 625, 115281, '0:00:00', '18:00:00', '18:00:00', 2, 2, 0),
(625, 625, 115282, '0:00:00', '19:00:00', '18:00:00', 2, 2, 3600)
The above SQL has a few errors in it.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]