Click here to Skip to main content
15,887,214 members
Home / Discussions / Database
   

Database

 
GeneralRe: Update trigger. Pin
Septimus Hedgehog24-Jul-13 11:33
Septimus Hedgehog24-Jul-13 11:33 
GeneralRe: Update trigger. Pin
Mycroft Holmes24-Jul-13 12:47
professionalMycroft Holmes24-Jul-13 12:47 
GeneralRe: Update trigger. Pin
Septimus Hedgehog24-Jul-13 20:15
Septimus Hedgehog24-Jul-13 20:15 
GeneralRe: Update trigger. Pin
Mycroft Holmes24-Jul-13 20:22
professionalMycroft Holmes24-Jul-13 20:22 
GeneralRe: Update trigger. Pin
Shameel25-Jul-13 5:08
professionalShameel25-Jul-13 5:08 
GeneralRe: Update trigger. Pin
Richard Deeming25-Jul-13 6:25
mveRichard Deeming25-Jul-13 6:25 
QuestionHow to identify identical master-detail records. Pin
David Mujica23-Jul-13 10:44
David Mujica23-Jul-13 10:44 
AnswerRe: How to identify identical master-detail records. Pin
Richard Deeming23-Jul-13 12:03
mveRichard Deeming23-Jul-13 12:03 
Something along these lines might get you started:
SQL
SELECT
   A.ID As OriginalID,
   B.ID As DuplicateID
FROM
   -- Every pair of master records:
   MasterTable As A
   CROSS JOIN
   MasterTable As B
WHERE
   -- Only those pairs where A is earlier than B:
   A.ID < B.ID
And
   -- All detail lines for A exist for B:
   Not Exists
   (
      SELECT
         (relevant columns)
      FROM
         DetailTable
      WHERE
         MasterID = A.ID
      
      EXCEPT
      
      SELECT
         (relevant columns)
      FROM
         DetailTable
      WHERE
         MasterID = B.ID
   )
And
   -- All detail lines for B exist for A:
   Not Exists
   (
      SELECT
         (relevant columns)
      FROM
         DetailTable
      WHERE
         MasterID = B.ID
      
      EXCEPT
      
      SELECT
         (relevant columns)
      FROM
         DetailTable
      WHERE
         MasterID = A.ID
   )




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralThanks Pin
David Mujica24-Jul-13 5:17
David Mujica24-Jul-13 5:17 
GeneralRe: Thanks Pin
Mycroft Holmes24-Jul-13 12:40
professionalMycroft Holmes24-Jul-13 12:40 
GeneralRe: Thanks Pin
Richard Deeming25-Jul-13 3:32
mveRichard Deeming25-Jul-13 3:32 
AnswerRe: How to identify identical master-detail records. Pin
Shameel23-Jul-13 23:29
professionalShameel23-Jul-13 23:29 
AnswerRe: How to identify identical master-detail records. Pin
GuyThiebaut24-Jul-13 1:52
professionalGuyThiebaut24-Jul-13 1:52 
QuestionRank over () / row_number over in sqlite Pin
jojoba2022-Jul-13 20:14
jojoba2022-Jul-13 20:14 
AnswerRe: Rank over () / row_number over in sqlite Pin
Mycroft Holmes22-Jul-13 22:55
professionalMycroft Holmes22-Jul-13 22:55 
QuestionRe: Rank over () / row_number over in sqlite Pin
jojoba2022-Jul-13 23:57
jojoba2022-Jul-13 23:57 
QuestionProduct dataabase Pin
DeerBear20-Jul-13 5:59
DeerBear20-Jul-13 5:59 
AnswerRe: Product dataabase Pin
Mycroft Holmes20-Jul-13 13:37
professionalMycroft Holmes20-Jul-13 13:37 
AnswerRe: Product dataabase Pin
Eddy Vluggen20-Jul-13 23:24
professionalEddy Vluggen20-Jul-13 23:24 
GeneralRe: Product dataabase Pin
DeerBear21-Jul-13 2:27
DeerBear21-Jul-13 2:27 
GeneralRe: Product dataabase Pin
Mycroft Holmes21-Jul-13 3:36
professionalMycroft Holmes21-Jul-13 3:36 
GeneralRe: Product dataabase Pin
DeerBear21-Jul-13 4:00
DeerBear21-Jul-13 4:00 
AnswerRe: Product dataabase Pin
jschell21-Jul-13 10:00
jschell21-Jul-13 10:00 
GeneralRe: Product dataabase Pin
Mycroft Holmes21-Jul-13 12:57
professionalMycroft Holmes21-Jul-13 12:57 
QuestionHow to issue setup to the different users according to their membership with windows application? Pin
mehtabalikhan16-Jul-13 19:21
mehtabalikhan16-Jul-13 19:21 

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.