List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:August 18 2005 2:56pm
Subject:Re: Deleted rows
View as plain text  
Scott,

 >How do I execute a query that shows missing ID's like so:

SELECT id AS i
FROM tbl
WHERE i <> 1 AND NOT EXISTS(
  SELECT id FROM tbl WHERE id = i - 1
);

PB

-----

Scott Hamm wrote:

>If I got a table as follows:
>
>
>ID foo
>1 12345
>2 12346
>4 12348
>6 12349
>7 12388
>9 12390
>How do I execute a query that shows missing ID's like so:
>
>3
>5
>8
>
>I wouldn't expect for it to show deleted data that was deleted, just show 
>the "skipped" ID's.
>
>That way I determine if operator deleted too much (cheating at QC)
>
>Is it possible?
>  
>
>------------------------------------------------------------------------
>
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.338 / Virus Database: 267.10.12/75 - Release Date: 8/17/2005
>  
>

Attachment: [text/html]
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.12/75 - Release Date: 8/17/2005
Thread
Deleted rowsScott Hamm18 Aug
  • Re: Deleted rowsSGreen18 Aug
  • Re: Deleted rowsPeter Brawley18 Aug
    • Re: Deleted rowsSGreen18 Aug
      • Re: Deleted rowsScott Hamm18 Aug
      • Re: Deleted rowsPeter Brawley18 Aug
RE: Deleted rowsemierzwa18 Aug