Re: [firebird-support] strange bahaviour

2019-07-04 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 04/07/2019 11:21, Svein Erling Tysvær setys...@gmail.com [firebird-support] ha scritto: If you were using dialect 1, I would say the difference would be expected (since NUMERIC(18) is equal to DOUBLE PRECISION in dialect 1), but I guess you're using dialect 3? Yes, I use dialect 3

Re: [firebird-support] strange bahaviour

2019-07-03 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 03/07/2019 16:35, liviuslivius liviusliv...@poczta.onet.pl [firebird-support] ha scritto: What are the exact types of both fields? NUMERIC(18,4) via domain: CREATE DOMAIN CURRENCY_D  AS Numeric(18,4)  DEFAULT 0.00  NOT NULL ; Thanks. -- Luigi Siciliano --

[firebird-support] strange bahaviour

2019-07-03 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
I have this query: select   id,   importo,   pagato from   elenco_scadenze where   (importo - pagato) <> 0.00 and this results: ID    IMPORTO    PAGATO 29 60,0016   60,00 90    569,8344    569,83 If I do this: UPDATE   ELENCO_SCADENZE set   IMPORTO = CAST(IMPORTO AS

Re: [firebird-support] No login to all databases

2019-05-02 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hello, Il 02/05/2019 10.53, Salvatore Besso salvatore.be...@outlook.it [firebird-support] ha scritto: maybe a remove and reinstall of Firebird could cure the problem. Save the users database before removing Firebird. No, remove and reinstall do not solve :( maybe Windows is damaged (I see

Re: [firebird-support] No login to all databases

2019-05-02 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
I tried to copy all my databases in another system and with the same server version 2.5.8.27089 and the same Flamerobin version 0.9.2 the databases opens and i can read all tables. What I can verify on system that cannot open databases? Thanks -- Luigi Siciliano --

[firebird-support] No login to all databases

2019-05-02 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hello,   I had a system failure... My system not boot at all. Seems to lost the MBR that I rebuild with a command line "bootsect /nt60 c: /MBR" After the rebuild MBR my sistem seems to works but all Firebird databases not login. Seems that Firebird hangs but in windows resource manager Firebird

Re: ODP: [firebird-support] Before Insert or After Insert trigger?

2018-09-07 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hi, Il 06/09/2018 10.41, Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support] ha scritto: If you need to update same table then „before” update trigger is the best choice. >>Updating another table from a Before trigger is made in a transaction >>that rolling back if exception

[firebird-support] Before Insert or After Insert trigger?

2018-09-06 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo,   I have an After Insert/Update trigger for a table to update another table like this:   if (NEW.AGGIORNA_CONDIZIONI = 1) then     begin   update     ARTICOLI_CONDIZIONI_CLIENTI ACC   SET           end   else if ... Now I need to set a fields in the same table

Re: [firebird-support] Query and problem with nulls

2018-01-05 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 04/01/2018 21.57, setysvar setys...@gmail.com [firebird-support] ha scritto: I expect the following query to give you the result you want: ... Yes. I think I understand your query and I'll treasure it for the next time. Thanks so much. -- Luigi Siciliano

Re: [firebird-support] Query and problem with nulls

2018-01-04 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
not, I not solved ;( The query seem to works because return rows but the rows returned are wrongs. -- Luigi Siciliano --

Re: [firebird-support] Query and problem with nulls

2018-01-04 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 04/01/2018 13.27, Rustam rusta...@ukr.net [firebird-support] ha scritto: Try use explicit JOIN here: ... FROM   DOC_CORPO DC, DOC_TESTA DT Not works because in DT there is not rows between 01/01/2018 and 31/12/2018. But I solved: I have another table in database that contains

Re: [firebird-support] Query and problem with nulls

2018-01-04 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
I expecting the result because in table Doc_testa DT I have rows between 01/01/2017 and 31/12/2017 and not have rows between 01/01/2018 and 31/12/2018. -- Luigi Siciliano --

Re: [firebird-support] Query and problem with nulls

2018-01-04 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 04/01/2018 16.58, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] ha scritto: > 04.01.2018 16:55, Luigi Siciliano luigi...@tiscalinet.it [firebird-support] > wrote: >> As you see: >> - if I select between 01/01/2018 and 31/12/2018 the are not rows in D

Re: [firebird-support] Query and problem with nulls

2018-01-04 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 04/01/2018 12.39, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] ha scritto: > Are you sure that your query really returns all nulls and this is not a > visual bug in > the tool you run this query in? Show log from isql, please. the log is: SQL> SELECT CON>  

[firebird-support] Query and problem with nulls

2018-01-04 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo,   The following query works fine but returns *all nulls* if no rows between :DaData and :AData SELECT   DEPOSITO_ID,   RIPORTO,   CARICO,   SCARICO,   RIPORTO + ESISTENZA AS ESISTENZA,   IMPEGNATI,   ORDINATI FROM (  SELECT    DT.DEPOSITO_ID,    (SELECT   SUM(DC2.CARICO

Re: [firebird-support] How I can speed up this query

2017-10-14 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 13/10/2017 21.33, 'Daniel Miller' dmil...@amfes.com [firebird-support] ha scritto: > It would be interesting to compare the plans for both your original query syntax and Set's suggestion - see where the difference is. Original: PLAN (PNC2 NATURAL) PLAN JOIN (PNC NATURAL, PNT

Re: [firebird-support] How I can speed up this query

2017-10-12 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 11/10/2017 20.38, setysvar setys...@gmail.com [firebird-support] ha scritto: > I think this should give the same result as your query, whether or not > it is any quicker, I simply do not know (but I would love to hear if it > made any difference). Your query is to slow, flamerobin

[firebird-support] How I can speed up this query

2017-10-11 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, I have this query SELECT   ID,   DENOMINAZIONE,   SCADENZA,   PARTITA,   NUMERO_DOCUMENTO,   DATA_DOCUMENTO,   IMPORTO,   IMPORTO - PAGATO AS RESIDUO,   PAGATO,   PAGAMENTO,   SALDARE from ( SELECT   C.ID,   C.DENOMINAZIONE,   PNS.SCADENZA,   PNS.PARTITA,  

Re: [firebird-support] why I not get first row in procedure

2017-09-01 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Ok, I find my mistake: It is necessary add a line SUSPEND after DO before the second FOR SELECT like this: FOR SELECT     DO *SUSPEND*  FOR SELECT   Thanks. -- Luigi Siciliano --

[firebird-support] why I not get first row in procedure

2017-09-01 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, why I not get first row in this procedure: SET TERM ^ ; RECREATE PROCEDURE ESTRATTO_CONTO_prova (     CONTO Char(5),     CLIENTE Smallint,     DATADAL DATE,     DATAAL date ) RETURNS (     ID Integer,     DATA_REGISTRAZIONE Date,     CAUSALE_ID Char(3),     DATA_DOCUMENTO Date,   

[firebird-support] Is it possible IF then statement in where clause?

2017-08-30 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo,   I have a stored procedure that have two parameters: CONTO and CLIENTE because there is two values for CONTO that needs CLIENTE parameters, all other values of CONTO not needs CLIENTE. I need to have a if statement in WHERE clause to add "AND IIF (PNC.CLIENTE_ID IS NOT NULL,

[firebird-support] "EXTRACT (YEAR FROM DT.DATA) <= 2016" or "DT.DATA <= '12/31/2016'"

2016-12-09 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, what is more performant from subject? I would prepare myself for a table that grows rapidly. Is the same in FB 2.5.6 or 3.0.1? Thanks -- Luigi Siciliano --

Re: [firebird-support] Connecting to Firebird database from two or more pc with same username

2016-04-14 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hello, Il 14/04/2016 09.26, 'Thomas Steinmaurer' t...@iblogmanager.com [firebird-support] ha scritto: I guess you mean with the same Firebird user name? Or are you using Windows trusted authentication? Oops, sorry. I mean the same Firebird username. I notice that in an LAN with three

[firebird-support] Connecting to Firebird database from two or more pc with same username

2016-04-14 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hello, If a user try to connect from two or more PC with same username, Firebird accepts the connection but is safe without problems or is best to avoid like the pest? Thanks. -- Luigi Siciliano --

Re: [firebird-support] How write a query with a progressive sum field

2016-03-09 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 08/03/2016 20.36, setysvar setys...@gmail.com [firebird-support] ha scritto: > This will not work properly if more than one row of DC are joined to > the same DT (but then your ORDER BY isn't 100% deterministic). If you > change the ordering of your query, you also have to change the

Re: [firebird-support] How write a query with a progressive sum field

2016-03-07 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Il 07/03/2016 17.28, Thomas Steinmaurer t...@iblogmanager.com [firebird-support] ha scritto: > Although not that flexible as an ad-hoc query, but perhaps your > particular use case can be achieved with a selectable stored procedure > ... Thank you Thomas, I modified my query like this: select

Re: [firebird-support] How write a query with a progressive sum field

2016-03-07 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Il 07/03/2016 11.58, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] ha scritto: > sum(carcio-scarcio) over () as SALDO. Ok, I understand but, "over" is unknow in firebird 2.5.5. I modified my query like this: select DT.DATA, DT.DOCUMENTO_ID, DT.NUMERO, DT.SERIE,

Re: [firebird-support] How write a query with a progressive sum field

2016-03-07 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 07/03/2016 11.32, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] ha scritto: > sum(saldo) over (order by data) Thank You for your response but I can't do: sum(SALDO) because SALDO is not a field of my table. I badly explained myself: I have a table with only this fields:

[firebird-support] How write a query with a progressive sum field

2016-03-07 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, I need to write a query with a computed field that contain a progressive sum like this table: DATA DOCUMENTO_ID NUMERO SERIE CARICO SCARICO SALDO 01/01 A 1 A 10 1 02/01 A

[firebird-support] RDB$FLAGS for trigger CHECK_XX in RDB$TRIGGERS is corrupted (304) Error in log file

2016-03-02 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, in firebird v.2.5.5 log file I discovered this frequent error: Database: PP RDB$FLAGS for trigger CHECK_30 in RDB$TRIGGERS is corrupted (304) RDB$FLAGS for trigger CHECK_31 in RDB$TRIGGERS is corrupted (304) RDB$FLAGS for trigger CHECK_32 in RDB$TRIGGERS is corrupted (304) RDB$FLAGS for

[firebird-support] RDB$FLAGS for trigger CHECK_XX in RDB$TRIGGERS is corrupted (304) Error in log file

2016-03-01 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, in firebird v.2.5.5 log file I discovered this frequent error: Database: PP RDB$FLAGS for trigger CHECK_30 in RDB$TRIGGERS is corrupted (304) RDB$FLAGS for trigger CHECK_31 in RDB$TRIGGERS is corrupted (304) RDB$FLAGS for trigger CHECK_32 in RDB$TRIGGERS is corrupted (304) RDB$FLAGS for

Re: [firebird-support] SUM(DC.I) / SUM(DC.Q) vs SUM(DC.I / DC.Q) why result is different?

2016-02-29 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 29/02/2016 17.51, Fernando P. Nájera Cano y...@fernandonajera.com [firebird-support] ha scritto: > When you do SUM(DC.I / DC.Q), the value of the division is calculated > *per row*, and then those values are summed up. > > Fernando Nájera Ok, now I understand. Thank You -- Luigi

Re: [firebird-support] SUM(DC.I) / SUM(DC.Q) vs SUM(DC.I / DC.Q) why result is different?

2016-02-29 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 29/02/2016 15.31, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] ha scritto: > 29.02.2016 15:19, Luigi Siciliano luigi...@tiscalinet.it [firebird-support] > wrote: >> What is the difference from "SUM(DC.I) / SUM(DC.Q)" >> and "SUM(DC.

[firebird-support] SUM(DC.I) / SUM(DC.Q) vs SUM(DC.I / DC.Q) why result is different?

2016-02-29 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, I have, in DC table, two rows with same data: A_IDI Q 1 370 1 2 370 1 with this query: SELECT FIRST 1 DT.D as DCU, SUM(DC.I) / SUM(DC.Q) AS CU, (SELECT SUM(DC.I) / SUM(Q) FROM DOC_C DC WHERE DC.C > 0.00 AND DC.A_ID

[firebird-support] How to manage tribbers BeforeUpdate and AfterUpdate for same table

2016-01-25 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, I Have a table with a column (TrigSign) that is a signal (programmatically setted without direct users interactions) for a BeforeInsert/Update trigger to do some updates in other table: Example: If TrigSign = 0 do Nothing else If TrigSign = 1 do Something else if TrigSign = 2 do

Re: [firebird-support] Small Database with very very bad performance on LAN

2016-01-08 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 08/01/2016 16.30, Thomas Steinmaurer t...@iblogmanager.com [firebird-support] ha scritto: > You have to sort out where your current bottleneck is. > > Can you pin-point it to a particular query or is performance in general > bad? With Firebird 2.5, you have quite some monitoring amory,

Re: [firebird-support] Small Database with very very bad performance on LAN

2016-01-08 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 08/01/2016 16.22, Tim Ward t...@telensa.com [firebird-support] ha scritto: > What are your queries, query plans, query statistics? The queries are similar to: SELECT * FROM TABLE. Investigating for query plans, statistics, Buffers as suggested by Thomas, I discovered the origin of

[firebird-support] Small Database with very very bad performance on LAN

2016-01-08 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, I have a small database (less 100MB) that works on Firebird 2.5.5 SS64bit over a machine with Win7 64bit with 4GB Ram, CPU Pentium G620. I seems to work very well in local but with the 3 clients on LAN works very bad. It is very very slow to open and navigate a simple table with

Re: [firebird-support] Small Database with very very bad performance on LAN

2016-01-08 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, Il 08/01/2016 14.20, Daniel Rail dan...@accra.ca [firebird-support] ha scritto: Have you tried with SuperClassic or Classic? SuperServer 2.5.5 still Ok, I tried SC and CS and the performance on LAN seems best of SS but not good :( May be the performance of CS is best of SC but

[firebird-support] Numeration without hole, Is right Before Insert Trigger?

2015-12-22 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hello, I must assign a serial number, without hole, in a column of a fiscal document. I must assign the number only when I know if the document is complete and I think the right moment is on a Before Insert Trigger for the table. Is right or the insertion can fail? If not right, when I must

[firebird-support] Why during installation firebird.msg is not being copied in c:\windows?

2015-09-27 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, I installed FB 2.5.4 like by defaults. When I get an error (i.e. password incorrect) FB returns a Error message like this: "SQL Error: Your user name and password are not defined. Ask your database administrator to set up a Firebird login.. Error Code: -902. can't format message 13:98

[firebird-support] There is a simple way to rename constraint that have not a name?

2015-01-30 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
There is a way to rename constraint that have not a name? I have a database with a no name constraint primary key in many tables. I learned my lesson and I would repair to this situation. There is a simple way to assign a name to all no name constraints? Like this statement: UPDATE

Re: [firebird-support] How to change Primary Key on a table by adding a new field

2015-01-27 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hello Bogdan, thanks for your suggestion. By ZeosLib TSQLProcessor, I try this: -- SET TERM !!; EXECUTE BLOCK RETURNS (stmt VARCHAR(1000)) AS BEGIN FOR SELECT 'ALTER TABLE MYTABLE DROP CONSTRAINT ' || rdb$constraint_name from rdb$relation_constraints where

[firebird-support] How to change Primary Key on a table by adding a new field

2015-01-26 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hello, I have an application that use a Firebird database and I need to change a Primary Key on a table by adding a new field. I can drop a primary key constraint by ALTER TABLE MyTable DROP CONSTRAINT MyINTEG_000 where MyINTEG_000 is the constraint on my development database file. I

[firebird-support] How merge two queries

2014-09-10 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo, I have two queries: First (results: ANNO, IMPONIBILE): select EXTRACT(YEAR FROM DT.DATA_DOCUMENTO) AS ANNO, SUM(DC.IMPORTO) AS IMPONIBILE from DOC_CORPO DC, DOC_TESTA DT, VOCI V WHERE DT.ID = DOC_TESTA_ID AND DT.DOCUMENTO_ID 'PRO' AND EXTRACT(YEAR FROM