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

Database

 
AnswerRe: Find phonetic word in SQL Pin
Pete O'Hanlon23-Aug-12 5:29
mvePete O'Hanlon23-Aug-12 5:29 
GeneralRe: Find phonetic word in SQL Pin
chandra reinhart11-Sep-12 19:56
chandra reinhart11-Sep-12 19:56 
AnswerRe: Find phonetic word in SQL Pin
Niladri_Biswas23-Aug-12 19:42
Niladri_Biswas23-Aug-12 19:42 
GeneralRe: Find phonetic word in SQL Pin
chandra reinhart11-Sep-12 19:53
chandra reinhart11-Sep-12 19:53 
QuestionSQL Table Grouping Pin
milo-xml20-Aug-12 3:56
professionalmilo-xml20-Aug-12 3:56 
AnswerRe: SQL Table Grouping Pin
David Mujica20-Aug-12 4:54
David Mujica20-Aug-12 4:54 
GeneralRe: SQL Table Grouping Pin
milo-xml20-Aug-12 6:19
professionalmilo-xml20-Aug-12 6:19 
AnswerRe: SQL Table Grouping Pin
Paul Conrad20-Aug-12 6:26
professionalPaul Conrad20-Aug-12 6:26 
GeneralRe: SQL Table Grouping Pin
milo-xml20-Aug-12 6:36
professionalmilo-xml20-Aug-12 6:36 
AnswerRe: SQL Table Grouping Pin
Paul Conrad20-Aug-12 6:43
professionalPaul Conrad20-Aug-12 6:43 
GeneralRe: SQL Table Grouping Pin
milo-xml20-Aug-12 8:45
professionalmilo-xml20-Aug-12 8:45 
GeneralRe: SQL Table Grouping Pin
Paul Conrad20-Aug-12 8:52
professionalPaul Conrad20-Aug-12 8:52 
GeneralRe: SQL Table Grouping Pin
Paul Conrad20-Aug-12 6:22
professionalPaul Conrad20-Aug-12 6:22 
AnswerRe: SQL Table Grouping Pin
Blue_Boy20-Aug-12 22:15
Blue_Boy20-Aug-12 22:15 
AnswerRe: SQL Table Grouping Pin
i.j.russell20-Aug-12 23:47
i.j.russell20-Aug-12 23:47 
GeneralRe: SQL Table Grouping Pin
milo-xml21-Aug-12 3:03
professionalmilo-xml21-Aug-12 3:03 
GeneralRe: SQL Table Grouping Pin
i.j.russell21-Aug-12 3:53
i.j.russell21-Aug-12 3:53 
GeneralRe: SQL Table Grouping Pin
milo-xml21-Aug-12 4:42
professionalmilo-xml21-Aug-12 4:42 
AnswerRe: SQL Table Grouping Pin
Niladri_Biswas21-Aug-12 22:26
Niladri_Biswas21-Aug-12 22:26 
AnswerRe: SQL Table Grouping Pin
__TR__21-Aug-12 22:28
__TR__21-Aug-12 22:28 
AnswerRe: SQL Table Grouping Pin
milo-xml22-Aug-12 7:54
professionalmilo-xml22-Aug-12 7:54 
AnswerRe: SQL Table Grouping Pin
Michael Potter23-Aug-12 6:16
Michael Potter23-Aug-12 6:16 
Not really knowing the structure of your keys - something like this should work.

SQL
SELECT
    s.PI,
    s.JobID,
    s.FormID,
    s.ShiftID,
    s.StartEvent,
    s.SW,
    s.SG,
    e.EndEvent,
    e.EG,
    e.EW
FROM
    [BaseTable] s
INNER JOIN 
    [BaseTable] e
    ON (s.PI = e.PI AND 
        s.JobId = e.JobId AND
        s.FormId = e.FormId AND
        s.ShiftId = e.ShiftId AND
        e.EndEvent = (SELECT 
                         MAX(EndEvent)
                      FROM
			 [BaseTable] 
		      WHERE 
 		         s.PI = PI AND
                         s.JobId = JobId AND
                         s.FormId = FormId AND
                         s.ShiftId = ShiftId))
WHERE
    s.StartEvent = (SELECT
                       MIN(StartEvent)
                    FROM
                       [BaseTable] 
		    WHERE 
 		       s.PI = PI AND
                       s.JobId = JobId AND
                       s.FormId = FormId AND
                       s.ShiftId = ShiftId)

Questionssis database reocords to execel sheet Pin
vasu1219-Aug-12 18:56
vasu1219-Aug-12 18:56 
Questionconverting console base application to windows form Pin
shaikh-adil17-Aug-12 7:45
shaikh-adil17-Aug-12 7:45 
AnswerRe: converting console base application to windows form Pin
Eddy Vluggen17-Aug-12 7:57
professionalEddy Vluggen17-Aug-12 7:57 

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.