RE: [firebird-support] system table behaviour

2016-02-04 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
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

RE: [firebird-support] How do find duplicates in a table?

2016-02-04 Thread 'Edward Mendez' emendez...@nc.rr.com [firebird-support]
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

Re: [firebird-support] unsupported on-disk structure

2016-02-04 Thread slucas slu...@iquanta.com [firebird-support]
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

[firebird-support] trigger, changed code, old session

2016-02-04 Thread 'checkmail' check_m...@satron.de [firebird-support]
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

Re: [firebird-support] How do find duplicates in a table?

2016-02-04 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
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.

RE: [firebird-support] How do find duplicates in a table?

2016-02-04 Thread 'stwizard' stwiz...@att.net [firebird-support]
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(*)

[firebird-support] How do find duplicates in a table?

2016-02-04 Thread 'stwizard' stwiz...@att.net [firebird-support]
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

Re: [firebird-support] How do find duplicates in a table?

2016-02-04 Thread 'Woody' woody-...@gt.rr.com [firebird-support]
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:

Re: [firebird-support] How do find duplicates in a table?

2016-02-04 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]
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

RE: [firebird-support] How do find duplicates in a table?

2016-02-04 Thread Peterson Seridonio loukinh...@hotmail.com [firebird-support]
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:

RE: [firebird-support] How do find duplicates in a table?

2016-02-04 Thread 'stwizard' stwiz...@att.net [firebird-support]
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,