On Thu, 4 Feb 2016 15:55:29 +1100, "'Andrew Zenz'
and...@aimsoftware.com.au
[firebird-support]" wrote:
> 'Tis starting to make some sense now.
>
> Unfortunately our application establishes a connection to the FB server
> and remains active until shut down. I
Also, if you want to get back the PERSON records instead of the SOC_SEC_NO
try.
WITH CTE
AS (SELECT SOC_SEC_NO
FROM PERSON
GROUP BY SOC_SEC_NO
HAVING COUNT(*) > 1)
SELECT PERSON.*
FROM PERSON
INNER JOIN CTE ON (CTE.SOC_SEC_NO = PERSON.SOC_SEC_NO)
Hope this is
i just wanted to add to this thread, even if it is a year later.
i suddenly had a problem connecting to my firebird fdb files. delphi
executables threw back a crazy error about, and i quote it partially,
"unsupported on-disk structure for file xxx.fdb; found 32779.16, support
, ..." etc.
so
Hello,
I'm using Firebird 2.5 cs. Yesterday I had inserted a new column and changed
some Trigger-Code. Some of the clients connected before to the database. The
bevore insert trigger set the new column with a generator-value. How can I
change the behavior that the old connections don't uses
04.02.2016 20:09, 'stwizard' stwiz...@att.net [firebird-support] wrote:
> How do I form a SQL Select statement that will return which records in my
> PERSON table
> have duplicate SOC_SEC_NO.
RTFM GROUP BY, HAVING, COUNT().
--
WBR, SD.
I had finally figured it out just before your reply
SELECT DISTINCT P.SOC_SEC_NO,
(SELECT COUNT(*)
FROM PERSON P2
WHERE P2.SOC_SEC_NO = P.SOC_SEC_NO) AS CNT
FROM PERSON P
WHERE P.SOC_SEC_NO IS NOT NULL
GROUP BY 1
HAVING (SELECT COUNT(*)
Greetings All,
How do I form a SQL Select statement that will return which records in my
PERSON table have duplicate SOC_SEC_NO.
In other words I need a list of persons where the social security number
appears in the database more than once. Some SOC_SEC_NO may be null which I do
not
Try this instead:
Select Soc_Sec_No, count(*) from Person
group by Soc_Sec_No
having count(*) > 1
This will list the social security numbers and the count if there are
more than one without
all the additional selects.
HTH
Woody (TMW)
-Original Message-
From:
Hi,
It is faster to use RDB$DB_KEY to find and delete duplicates.
See more details here
http://ib-aid.com/en/articles/how-to-find-and-delete-duplicate-records-in-firebird-database/
Regards,
Alexey Kovyazin
IBSurgeon
I had finally figured it out just before your reply
SELECT DISTINCT
This may works.
SELECT PERSON.PERSON_ID, COUNT(PERSON.SOC_SEC_NO) FROM PERSON HAVING
COUNT(PERSON.SOC_SEC_NO) > 1;
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Sent: quinta-feira, 4 de fevereiro de 2016 17:10
To: firebird-support@yahoogroups.com
Subject:
Thanks Woody much simpler.
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]
Sent: Thursday, February 04, 2016 1:42 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] How do find duplicates in a table?
Try this instead:
Select Soc_Sec_No,
11 matches
Mail list logo