Click here to Skip to main content
15,918,193 members
Home / Discussions / Database
   

Database

 
GeneralDELETE X WHERE Y IN (SubQuery) Problem Pin
Tristan Rhodes16-Nov-04 0:55
Tristan Rhodes16-Nov-04 0:55 
GeneralRe: DELETE X WHERE Y IN (SubQuery) Problem Pin
Colin Angus Mackay16-Nov-04 1:38
Colin Angus Mackay16-Nov-04 1:38 
GeneralRe: DELETE X WHERE Y IN (SubQuery) Problem Pin
Tristan Rhodes16-Nov-04 3:17
Tristan Rhodes16-Nov-04 3:17 
GeneralRe: DELETE X WHERE Y IN (SubQuery) Problem Pin
Colin Angus Mackay16-Nov-04 5:46
Colin Angus Mackay16-Nov-04 5:46 
QuestionHow to import both adoce31.dll & adoxce31.dll? Pin
george ivanov16-Nov-04 0:53
george ivanov16-Nov-04 0:53 
GeneralDeclare Varibales In SQL 2000 Pin
Hemant Mane15-Nov-04 19:03
Hemant Mane15-Nov-04 19:03 
GeneralSequential Dates and Grouping Pin
Peet Schultz15-Nov-04 2:47
Peet Schultz15-Nov-04 2:47 
GeneralRe: Sequential Dates and Grouping Pin
Michael Potter15-Nov-04 3:33
Michael Potter15-Nov-04 3:33 
You can try something like:
<code>SELECT
     wt.DateWorked
FROM 
     WorkTable wt
WHERE
     wt.ShiftType <>
          (SELECT
               ShiftType
           FROM
               WorkTable
           WHERE
               ResourceTag = wt.ResourceTag AND
               DateWorked = (SELECT 
                                 MAX(DateWorked)
                             FROM 
                                 WorkTable
                             WHERE
                                 ResourceTag = wt.ResourceTag AND
                                 DateWorked < wt.DateWorked))

The table will need the following index to work quickly:
<code>CREATE INDEX ShiftTest ON WorkTable
(
     ResourceTag,
     DateWorked
)

This assumes that no worker will work more than 1 shift per day.
GeneralRe: Sequential Dates and Grouping Pin
Peet Schultz15-Nov-04 4:11
Peet Schultz15-Nov-04 4:11 
GeneralRe: Sequential Dates and Grouping Pin
Michael Potter15-Nov-04 8:10
Michael Potter15-Nov-04 8:10 
GeneralGenerate SQL Script ( store procedure problem) Pin
manxx14-Nov-04 8:40
manxx14-Nov-04 8:40 
GeneralView all Tables in database Pin
visitsaadi13-Nov-04 1:33
visitsaadi13-Nov-04 1:33 
GeneralRe: View all Tables in database Pin
Colin Angus Mackay13-Nov-04 1:51
Colin Angus Mackay13-Nov-04 1:51 
QuestionSelect Top 10 from a DataTable ??? Pin
luckyShek12-Nov-04 9:56
luckyShek12-Nov-04 9:56 
GeneralStored Procedures Pin
Anonymous12-Nov-04 6:02
Anonymous12-Nov-04 6:02 
GeneralRe: Stored Procedures Pin
Colin Angus Mackay12-Nov-04 6:41
Colin Angus Mackay12-Nov-04 6:41 
GeneralRe: Stored Procedures Pin
Anonymous14-Nov-04 22:38
Anonymous14-Nov-04 22:38 
QuestionHow to back up database on remote computer?? Pin
venadder12-Nov-04 5:07
venadder12-Nov-04 5:07 
GeneralConnection String for Connection to OLAP Server Pin
mysorian11-Nov-04 16:50
professionalmysorian11-Nov-04 16:50 
GeneralRe: Connection String for Connection to OLAP Server Pin
David Salter11-Nov-04 23:47
David Salter11-Nov-04 23:47 
GeneralFrom a Blob to some type of image in Java Pin
Red Sunday11-Nov-04 9:39
Red Sunday11-Nov-04 9:39 
GeneralInserting Pin
eggie511-Nov-04 8:45
eggie511-Nov-04 8:45 
GeneralRe: Inserting Pin
Colin Angus Mackay11-Nov-04 9:12
Colin Angus Mackay11-Nov-04 9:12 
GeneralRe: Inserting Pin
eggie511-Nov-04 9:15
eggie511-Nov-04 9:15 
GeneralRe: Inserting Pin
Colin Angus Mackay11-Nov-04 9:27
Colin Angus Mackay11-Nov-04 9:27 

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.