Re: [firebird-support] UPDATE OR INSERT in Firebird 3

2020-11-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
r to the standard. > > I hope that suggestion proves helpful > Warmly > River~~ > > On 19/11/2020, 'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com [firebird-support] > wrote: > > Hello everybody > > > > A long, long time without writing neither

Re: [firebird-support] Re: UPDATE OR INSERT in Firebird 3

2020-11-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
much better off explicitly writing > the appropriate insert and update triggers. Possibly version 4 will > implement IDENTITY better but I don't use it all now. > > Daniel > > On 11/20/2020 5:59 AM, 'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com [firebird-support] wrote: > > >

Re: [firebird-support] Re: UPDATE OR INSERT in Firebird 3

2020-11-20 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
for your answer. Greetings. Walter. On Fri, Nov 20, 2020 at 6:16 AM Herman Viaene herman.via...@edpnet.be [firebird-support] wrote: > > > Op 20/11/2020 om 01:04 schreef 'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com [firebird-support]: > > I use firebird3 fro

[firebird-support] Re: UPDATE OR INSERT in Firebird 3

2020-11-19 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
CREATE TABLE MYTABLE ( COLUMN1 INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL, COLUMN2 VARCHAR(20)); ALTER TABLE MYTABLE ADD CONSTRAINT PK_MYTABLE PRIMARY KEY (COLUMN1); Then, is I write it: UPDATE OR INSERT INTO MYTABLE (COLUMN1, COLUMN2) VALUES (NULL, 'TEST') The

[firebird-support] Re: UPDATE OR INSERT in Firebird 3

2020-11-19 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
I forget to say that my IDENTITY column is the Primary Key of MyTable, therefore if I don't write it an error happens because...the table needs a Primary Key. On Thu, Nov 19, 2020 at 8:52 PM Walter R. Ojeda Valiente < sistemas2000profesio...@gmail.com> wrote: > Hello everybody > > A long, long

[firebird-support] UPDATE OR INSERT in Firebird 3

2020-11-19 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody A long, long time without writing neither reading this group, mostly because all that I need about Firebird I knew. But now, I have a doubt. With Firebird 2.5.x I can have an auto-incremental column and use it in an UPDATE OR INSERT, but such thing is not possible with Firebird

Re: [firebird-support] Impossible to create a new database from a script

2018-03-17 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
:12 PM, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] <firebird-support@yahoogroups.com> wrote: > 17.03.2018 18:07, 'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com > [firebird-support] wrote: > > Sorry, but I don't understand. The script file is a plain

Re: [firebird-support] Impossible to create a new database from a script

2018-03-17 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you Dimitri for your answer. Greetings. Walter. Libre de virus. www.avast.com

Re: [firebird-support] Impossible to create a new database from a script

2018-03-17 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
l_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Sat, Mar 17, 2018 at 11:30 AM, Mark Rotteveel m...@lawinegevaar.nl [firebird-support] <firebird-support@yahoogroups.com> wrote: > > > On 17-3-2018 16:21, 'Walter R. Ojeda Valiente' > sistemas2000profesio..

Re: [firebird-support] Impossible to create a new database from a script

2018-03-17 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
17-3-2018 14:12, 'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com [firebird-support] wrote: > > I am using Firebird 2.5..8 in Windows 7. > > > > I have a script file which contains the lines for create a database and > > theirs domains, tables, triggers

[firebird-support] Impossible to create a new database from a script

2018-03-17 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody I am using Firebird 2.5.8 in Windows 7. I have a script file which contains the lines for create a database and theirs domains, tables, triggers, and so on. The problem is in the lines of comments. CREATE DATABASE '127.0.0.1/3050:E :\SQL\SQL_MUAN\DATABASES\MUAN_MASTER_21.FDB'

Re: Re[2]: [firebird-support] select column if it exists

2018-01-02 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
What about: SELECT A, B, COALESCE(C, 'some value here') FROM MyTable Greetings. Walter. On Tue, Oct 10, 2017 at 2:56 PM, 'Daniel Miller' dmil...@amfes.com [firebird-support] wrote: > > > I don't think you could express it in the SELECT directly

Re: [firebird-support] detect if database has changed

2018-01-02 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
There are several ways for doing that. One of them, is to create a table, called CHANGES, by example, and with the columns: TABLENAME, USERNAME, DATEANDTIME, etc. Then, for each table of your interest, you create a trigger which inserts a row in the table CHANGES when a user do an INSERT,

Re: [firebird-support] Connected databases to the Server

2018-01-02 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
7.10.2017 22:57, 'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com > [firebird-support] wrote: > > Which databases are connected, right now? > >Use MON$ATTACHMENTS with SYSDBA ri

[firebird-support] Connected databases to the Server

2017-10-07 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everyone There is some way to know which databases are connected actually at the Server? Maybe 3 databases are connected now, or maybe 17, or maybe 83, how can I know that? Which databases are connected, right now? Thanks in advance. Greetings. Walter.

Re: [firebird-support] How to get the the tables and the columns of a Foreign Key?

2017-05-30 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
= > isMain.rdb$index_name > where iChild.rdb$index_name = 'FK_ADHERENTES' > > HTH, > Set > > 2017-05-30 7:10 GMT+02:00 'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com [firebird-support] < > firebird-support@yahoogroups.com>: > >> >> >> H

[firebird-support] Entity Relationship Diagram

2017-04-14 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everyone Excuse me if it is an off-topic. Do you know some good program for Entity Relationship Diagram using Firebird databases? I mean, having a Firebird database get its ERD Mister Google can answer that question but is not the same as comments of people who are using such programs.

Re: [firebird-support] Is there an easy way for input rows from a script file?

2017-02-16 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
gt; >> Greetings. >> >> Walter. >> >> >> On Wed, Feb 15, 2017 at 6:31 PM, setysvar setys...@gmail.com >> [firebird-support] <firebird-support@yahoogroups.com> wrote: >> >>> >>> >>> Den 15.02.2017 17:07, skrev 'Walter R. Oj

Re: [firebird-support] Re: Is there an easy way for input rows from a script file?

2017-02-16 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you Vlad, but is not for me, is for an article of my blog, I am showing the alternatives for exporting data. firebird21.wordpress.com Greetings. Walter. On Thu, Feb 16, 2017 at 3:44 AM, hv...@users.sourceforge.net [firebird-support] wrote: > > > ---In

Re: [firebird-support] Is there an easy way for input rows from a script file?

2017-02-15 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you, Sean Greetings. Walter. On Wed, Feb 15, 2017 at 6:43 PM, 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support] wrote: > > > Walter, > > > If I connect to a database "Database1" using ISQL, I can write something > like: > > > > OUTPUT

Re: [firebird-support] Is there an easy way for input rows from a script file?

2017-02-15 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
skrev 'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com [firebird-support]: > > Hello everybody > > If I connect to a database "Database1" using ISQL, I can write something > like: > > OUTPUT MyFile.DAT; > SELECT * FROM MyTable; > OUTPUT; >

[firebird-support] Is there an easy way for input rows from a script file?

2017-02-15 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody If I connect to a database "Database1" using ISQL, I can write something like: OUTPUT MyFile.DAT; SELECT * FROM MyTable; OUTPUT; And all the rows of "MyTable" will go to the text file "MyFile.DAT". That's ok and works fine. But now, I want to connect to "Database2", which also

Re: [firebird-support] Is this a bug of Firebird?

2017-02-10 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
A warning would be enough. If after the INTO clause there are 2 or 3 variables, no problem, it will be very easy to detect the mistake. But sometimes that is not the case because there are 20+ variables and if variable 3 is called "lcName" and variable 24 is called "lcName" too, the programmer

Re: [firebird-support] Is this a bug of Firebird?

2017-02-08 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
The error is of the programmer, I agree with you, but to repeat the name of a variable without the Firebird showing any message of error is, at least for me, a bug. To have 2 or more variables with the same name after the INTO clause is useless. The compiler can be smart enough to detect such

Re: [firebird-support] Is this a bug of Firebird?

2017-02-08 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
-support] <firebird-support@yahoogroups.com> wrote: > 08.02.2017 16:55, 'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com > [firebird-support] wrote: > > Of course, the fault is of the programmer, but it can be detected at > compilation time. > >Why?

[firebird-support] Is this a bug of Firebird?

2017-02-08 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
CREATE PROCEDURE TEST RETURNS( lcName VARCHAR(40)) AS BEGIN FOR SELECT ALU_NOMBRE, ALU_APELLD FROM ALUMNOS INTO :lcName, :lcName DO SUSPEND; END; In the above stored procedure there are 2 columns in the FOR SELECT but just 1 variable name. It

Re: [firebird-support] Re: Data pages and data page slots

2016-12-13 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much Vlad, that is what I was thinking but always is very better to have the explanation of one expert. Greetings. Walter. On Tue, Dec 13, 2016 at 11:25 AM, hv...@users.sourceforge.net [firebird-support] wrote: > > > ---In

[firebird-support] Data pages and data page slots

2016-12-12 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody When I run GSTAT with the switch -data it shows me numbers after "data pages" and "data page slots". Usually these numbers are the same, but ... what happen when they are different? I understood that the difference between them means the count of pages without any relevant data.

Re: [firebird-support] Speed of comparing one field to another

2016-11-28 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Yes, you can, using an expression index CREATE INDEX IDX_MYINDEX ON MY_TABLE COMPUTED BY (INVOICED - RECEIVED); and your SELECT would be: SELECT * FROM MY_TABLE WHERE INVOICED - RECEIVED < 0 That way you will not need to create an additional column neither to do an UPDATE neither to

Re: [firebird-support] Database design. Simple question!

2016-07-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
To have a separate table for a single column is a good idea if the column will be of type BLOB and will be used just sometimes. Greetings. Walter. On Mon, Jul 25, 2016 at 5:51 PM, shg_siste...@yahoo.com.ar [firebird-support] wrote: > > > Hello! I have a

Re: [firebird-support] Update table column from another table

2016-01-02 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Floating point values are not exact values, there is not guarantee. If you need exact values, use NUMERIC or DECIMAL instead. Greetings. Walter. On Sat, Jan 2, 2016 at 11:28 AM, Sonya Blade sonyablade2...@hotmail.com [firebird-support] wrote: > > > > Yes I

Re: [firebird-support] access column by column name

2015-12-26 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
You can use EXECUTE STATEMENT for that. Greetings. Walter. On Sat, Dec 26, 2015 at 1:50 PM, slucas slu...@iquanta.com [firebird-support] wrote: > > > hello one and all, > > i would like to write a stored procedure which looks something like: > > CREATE

Re: [firebird-support] error writing data to the connection

2015-12-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
You can know that the connection is active sending a request to the Server, something like: SELECT CURRENT_TIME FROM RDB$DATABASE In your application, using a control Timer, you can send such command each minute or so. If there is not response then connection is dead. For connecting again

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

2015-12-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Luigi If you can read Spanish, this article can be useful: https://firebird21.wordpress.com/2014/09/11/algo-mas-sobre-transacciones-optimistas-y-transacciones-pesimistas/ Greetings. Walter. On Thu, Dec 24, 2015 at 7:05 AM, Svein Erling Tysvær setys...@gmail.com [firebird-support]

Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-11-02 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Well, the more easy answer is not install Firebird under the folder "Program files", because Windows since its Vista version has protected that folder. You can install Firebird in C:\FIREBIRD\ or something so and no problems writing to any of its files. Greetings. Walter. On Sat, Oct 24,

Re: [firebird-support] Sort hierarchical data

2015-10-30 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
If you can read Spanish, there are several articles about that topic: https://firebird21.wordpress.com/2013/10/10/stored-procedures-recursivos/ https://firebird21.wordpress.com/2015/08/22/usando-recursividad-con-cte/ https://firebird21.wordpress.com/2015/08/27/ejemplo-de-recursion-1/

Re: [firebird-support] Order by

2015-10-07 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Aires > Germán > > > > > El Martes, 6 de octubre, 2015 21:02:31, "'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com [firebird-support]" < > firebird-support@yahoogroups.com> escribió: > > > > > > Germán, as you can read Span

Re: [firebird-support] Order by

2015-10-06 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Germán, as you can read Spanish, this article can be useful: https://firebird21.wordpress.com/2014/11/20/mostrando-los-resultados-ordenados-por-cualquier-criterio/ Greetings. Walter. On Tue, Oct 6, 2015 at 6:17 PM, Germán Balbi bal...@yahoo.com [firebird-support]

Re: Re: [firebird-support] How To Get Entire Linked Group Details

2015-10-02 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
> > > > On Friday, 2 October 2015 5:55 PM, "'Walter R. Ojeda Valiente' > sistemas2000profesio...@gmail.com [firebird-support]" < > firebird-support@yahoogroups.com> wrote: > > > > If you want to learn about recursivity with Firebird and you can read > S

Re: Re: [firebird-support] How To Get Entire Linked Group Details

2015-10-02 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
If you want to learn about recursivity with Firebird and you can read Spanish, there are several articles that can teach you: https://firebird21.wordpress.com/2015/08/22/usando-recursividad-con-cte/ https://firebird21.wordpress.com/2015/08/25/entendiendo-la-recursividad-en-los-select/

Re: [firebird-support] Firebird 2.5 Language Reference

2015-09-29 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much Germán Greetings. Walter. On Tue, Sep 29, 2015 at 10:10 PM, Germán Balbi bal...@yahoo.com [firebird-support] wrote: > > > Para una mucho mejor traducción usa el traductor de Microsoft > http://www.bing.com/translator/ > > > [image: image]

Re: [firebird-support] Firebird 3 compression data

2015-09-28 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much Carlos. In the document: http://web.firebirdsql.org/download/prerelease/rlsnotes/Firebird-3.0.0_Beta2-ReleaseNotes.pdf Which I take as my reference, there is not a single word about the parameter WireCompression. It's clear now. Greetings. Walter. On Mon, Sep 28, 2015

Re: [firebird-support] Re: SELECT for get the number of contexts

2015-09-27 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much Dmitry for your answer, it is more clear now, however I still have some doubts. According to Vlad Khorsun, each INSERT, UPDATE or DELETE has 2 contexts, cause of the variables NEW and OLD of the triggers. Is that not true? The only way to know how many contexts a stored

[firebird-support] Firebird 3 compression data

2015-09-27 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
According to this (very good) news, http://www.firebirdnews.org/firebird-3-protocol-benchmark/ Firebird 3 can have compression of data. Excellent!!! However neither in the above page neither in the "Firebird 3.0 Release Notes"

Re: [firebird-support] Firebird 3 compression data

2015-09-27 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Carlos Thank you for your answer. In your article you has written about the benchmark with and without compression. How you did that? You have "FB 3 padrao" and "FB 3 compressao". If I want to compare FB 3 against MySQL, Postegre, or whatever: how I can have compression enabled or

Re: [firebird-support] Re: SELECT for get the number of contexts

2015-09-27 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much Ann, it's very clear now. Greetings. Walter. On Sun, Sep 27, 2015 at 5:23 PM, Ann Harrison aharri...@ibphoenix.com [firebird-support] <firebird-support@yahoogroups.com> wrote: > > > > > On Sun, Sep 27, 2015 at 1:37 PM, 'Walter R. Ojeda Valiente' &

[firebird-support] SELECT for get the number of contexts

2015-09-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody Is there some SELECT that can give me the number of context a stored procedure has? As you know the maximum number of contexts is 255. And it would be interesting to know how many contexts a stored procedure has, without counting with the finger. Other question: Which are the

[firebird-support] Firebird 2.5 Language Reference

2015-09-16 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody Do you know what has happened with the translation of the document "Firebird 2.5 Language Reference" from Russian to English? They had requested for donation with the promise that their work would be ready in February 2015. The donation was made, now it is September 2015, but

Re: [firebird-support] Firebird 2.5 Language Reference

2015-09-16 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much, Alexey Is there an estimated date for the publication? Greetings. Walter. On Wed, Sep 16, 2015 at 2:34 PM, Alexey Kovyazin a...@ib-aid.com [firebird-support] wrote: > > > Hi, > > Translation was completed several weeks ago, now Helen

Re: [firebird-support] What is better: UPDATE or DELETE + INSERT?

2015-09-16 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much, Alexey. Greetings. Walter. On Wed, Sep 16, 2015 at 1:36 PM, Alexey Kovyazin a...@ib-aid.com [firebird-support] wrote: > > > Hi, > > See page 20-21 here > >

Re: [firebird-support] What is better: UPDATE or DELETE + INSERT?

2015-09-16 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Sean, and everybody That's a very interesting and very important theme: "the new record version will only include the updated fields -- not a full copy of the row" Do you know where I can find a document, web-page, book or video that explains that? If it has images or graphics, much

Re: [firebird-support] Re: Differences when adding a Primary Key

2015-08-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
...@ibphoenix.com [firebird-support] firebird-support@yahoogroups.com wrote: On Aug 21, 2015, at 2:13 PM, 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support] firebird-support@yahoogroups.com wrote: Without using CONSTRAINT doesn't work and in such case

Re: [firebird-support] Re: Differences when adding a Primary Key

2015-08-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
, 2015 at 2:43 PM, Ann Harrison aharri...@ibphoenix.com [firebird-support] firebird-support@yahoogroups.com wrote: On Aug 21, 2015, at 2:13 PM, 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support] firebird-support@yahoogroups.com wrote: Without using CONSTRAINT

Re: [firebird-support] Expression index for use with the GROUP BY clause

2015-08-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Karol Thank you for your answer. The query is a very simplified one, just for show the idea. I can create an index as the following: CREATE INDEX IDX_ASIENTOSDET1 ON ASIENTOSDET COMPUTED BY ( CAST(ASI_ANOEJE AS CHAR(5)) || CAST(ASI_CODSUC AS CHAR(5)) || CAST(EXTRACT(MONTH FROM

Re: [firebird-support] Re: Differences when adding a Primary Key

2015-08-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
[firebird-support] firebird-support@yahoogroups.com wrote: On Aug 21, 2015, at 2:13 PM, 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support] firebird-support@yahoogroups.com wrote: Without using CONSTRAINT doesn't work and in such case the name is choosed by Firebird

[firebird-support] Expression index for use with the GROUP BY clause

2015-08-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody I had the following query: SELECT D.ASI_ANOEJE, D.ASI_CODSUC, EXTRACT(MONTH FROM C.ASC_FECHAX) AS ASI_NUMMES, D.ASI_NUMCUE, D.ASI_NUMSUB FROM ASIENTOSDET D JOIN ASIENTOSCAB C ON D.ASI_CODSUC = C.ASC_CODSUC AND D.ASI_IDECAB = C.ASC_IDENTI GROUP

Re: [firebird-support] Expression index for use with the GROUP BY clause

2015-08-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Ok, thank you Karol. Greetings. Walter. On Mon, Aug 24, 2015 at 2:32 PM, liviusliv...@poczta.onet.pl [firebird-support] firebird-support@yahoogroups.com wrote: Hi, as i say previously you can not do this as index can not be updated if something was changed in ASIENTOSCAB. And any

Re: [firebird-support] Re: Differences when adding a Primary Key

2015-08-22 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
. On Fri, Aug 21, 2015 at 2:43 PM, Ann Harrison aharri...@ibphoenix.com [firebird-support] firebird-support@yahoogroups.com wrote: On Aug 21, 2015, at 2:13 PM, 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support] firebird-support@yahoogroups.com wrote: Without

[firebird-support] Re: Differences when adding a Primary Key

2015-08-21 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Nobody knows? Nobody has any idea? Greetings. Walter. On Thu, Aug 20, 2015 at 10:45 AM, Walter R. Ojeda Valiente sistemas2000profesio...@gmail.com wrote: Hello everybody For add a Primary Key to a table we can write: ALTER TABLE MyTable ADD PRIMARY KEY (ID); or we can write: ALTER

Re: [firebird-support] Re: Differences when adding a Primary Key

2015-08-21 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
fails, but why one fails and the other works? Greetings. Walter. On Fri, Aug 21, 2015 at 2:43 PM, Ann Harrison aharri...@ibphoenix.com [firebird-support] firebird-support@yahoogroups.com wrote: On Aug 21, 2015, at 2:13 PM, 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com

Re: [firebird-support] Re: Differences when adding a Primary Key

2015-08-21 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Valiente' sistemas2000profesio...@gmail.com [firebird-support] firebird-support@yahoogroups.com wrote: Nobody knows? Nobody has any idea? Greetings. Walter. On Thu, Aug 20, 2015 at 10:45 AM, Walter R. Ojeda Valiente sistemas2000profesio...@gmail.com wrote: Hello everybody For add

[firebird-support] Differences when adding a Primary Key

2015-08-20 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody For add a Primary Key to a table we can write: ALTER TABLE MyTable ADD PRIMARY KEY (ID); or we can write: ALTER TABLE MyTable ADD CONSTRAINT MyPK PRIMARY KEY (ID); In the first case, the Firebird puts the name of the Primary Key, in the second case we choose that name, but...

Re: [firebird-support] What is the best way to re-write this Stored Procedure that seems to be SLOW processing?

2015-08-15 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
setys...@gmail.com [firebird-support] firebird-support@yahoogroups.com wrote: Den 15.08.2015 06:14, skrev 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]: Hello Set Why writing: PP.STATUS_CODE || '' will improve the SELECT, can you explain me? As far I

Re: [firebird-support] What is the best way to re-write this Stored Procedure that seems to be SLOW processing?

2015-08-14 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Set Why writing: PP.STATUS_CODE || '' will improve the SELECT, can you explain me? As far I know, adding '' is for use NATURAL in the PLAN, why the use of NATURAL will do a better response time? Thanks in advance. Greetings. Walter. On Thu, Aug 13, 2015 at 4:49 PM, setysvar

Re: [firebird-support] Knowing the previous rows

2015-08-07 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Well, after run GSTAT and reading the output I can see how many garbage a whole table has, but it don't shows me the story of a row. ¿How many COMMITs and how many ROLLBACKs the row with ID 1234 of the table CLIENTS had had? Greetings. Walter. On Fri, Aug 7, 2015 at 1:42 PM, Walter R. Ojeda

Re: [firebird-support] Knowing the previous rows

2015-08-07 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you Ann, I shall investigate that. Greetings. Walter. On Fri, Aug 7, 2015 at 1:10 PM, Ann Harrison aharri...@ibphoenix.com [firebird-support] firebird-support@yahoogroups.com wrote: The idea is to know how many garbage a table has. Or several tables. Or the whole database.

Re: [firebird-support] Knowing the previous rows

2015-08-07 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
. Walter. On Fri, Aug 7, 2015 at 1:32 AM, liviuslivius liviusliv...@poczta.onet.pl [firebird-support] firebird-support@yahoogroups.com wrote: Hi, What about triggers? Regards, Karol Bieniaszewski Oryginalna wiadomość Od: 'Walter R. Ojeda Valiente' sistemas2000profesio

[firebird-support] Problem with AUTONOMOUS TRANSACTION

2015-08-07 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody Do you know why this simple trigger hang-up the database? CREATE TRIGGER TRANSACCION_INICIA ACTIVE ON TRANSACTION START POSITION 0 AS BEGIN IN AUTONOMOUS TRANSACTION DO BEGIN END END; Always when I put IN AUTONOMOUS TRANSACTION the database crash. Without those words

Re: [firebird-support] Problem with AUTONOMOUS TRANSACTION

2015-08-07 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Ha, ha, ha, ha, ha, ha, ha, ha. Thank you very much Helen, sometimes the memory is not so good as was some years ago. Ok, I now know and hope not forget again: NEVER USE IN AUTONOMOUS TRANSACTION INSIDE A TRANSACTION RELATED DATABASE TRIGGER. Greetings. Walter. On Fri, Aug 7, 2015 at 11:20

[firebird-support] Re: Firebird 3, execution modes

2015-07-14 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
¿Nobody has answers to my questions? Greetings. Walter. On Fri, Jul 10, 2015 at 10:39 PM, Walter R. Ojeda Valiente sistemas2000profesio...@gmail.com wrote: Reading the excellent (as usual) document of Helen Borrie: Firebird 3.0 Release Notes (for Firebird 3.0 Beta 2) I had some doubts:

Re: [firebird-support] Re: Firebird 3, execution modes

2015-07-14 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
are off topic on firebird-support. Mark - Reply message - Van: 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support] firebird-support@yahoogroups.com Aan: firebird-support@yahoogroups.com Onderwerp: [firebird-support] Re: Firebird 3, execution modes Datum: di

[firebird-support] Firebird 3, execution modes

2015-07-10 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Reading the excellent (as usual) document of Helen Borrie: Firebird 3.0 Release Notes (for Firebird 3.0 Beta 2) I had some doubts: First, it says that for choicing the working modes (models) I need to put values 0 or 1 at SharedCache and SharedDatabase. Ok with that. But then it says that the

Re: [firebird-support] Altering a domain

2015-06-20 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you Ann. Greetings. Walter. On Sat, Jun 20, 2015 at 9:04 AM, Ann Harrison aharri...@ibphoenix.com [firebird-support] firebird-support@yahoogroups.com wrote: On Jun 19, 2015, at 3:32 PM, 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support] firebird

Re: [firebird-support] Altering a domain

2015-06-19 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Excellent explanation Ann, as always. Just one doubt: After a cycle backup/restore: the restored database will have all the rows with the new domain? All columns with domain D_CURRENCY that were created with DECIMAL(9, 2) now will be DECIMAL(18, 2) ? Greetings. Walter. On Tue, Jun 16, 2015

Re: [firebird-support] Database restore speed with IBExpert and Gbak

2015-05-26 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much, Thomas. Very useful. Greetings. Walter. On Tue, May 26, 2015 at 1:02 PM, Thomas Steinmaurer t...@iblogmanager.com [firebird-support] firebird-support@yahoogroups.com wrote: Hello Walter, Hello Thomas That seems an interesting idea. Can you explain it with more

Re: [firebird-support] Database restore speed with IBExpert and Gbak

2015-05-26 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Thomas That seems an interesting idea. Can you explain it with more details? Greetings. Walter. On Tue, May 26, 2015 at 12:25 PM, Thomas Steinmaurer t...@iblogmanager.com [firebird-support] firebird-support@yahoogroups.com wrote: Halim, Thank you for your reply. I just tested a

Re: [firebird-support] GBAK - validation error for column X, value *** null ***

2015-05-23 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
If you only have a backup and the backup is corrupted then very bad news. The best politic is always to do a backup/restore cycle inmediatly. So, if an error is detected when the backup is being restored you can take actions at that right moment. If your operating system is Windows, you can

Re: [firebird-support] Test VARCAHR for numeric

2015-04-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Very interesting Mark, I shall remember that for the time when Firebird3 is coming here. Greetings. Walter. On Sat, Apr 25, 2015 at 3:14 AM, Mark Rotteveel m...@lawinegevaar.nl [firebird-support] firebird-support@yahoogroups.com wrote: On 25-4-2015 08:08, 'Walter R. Ojeda Valiente

Re: [firebird-support] Test VARCAHR for numeric

2015-04-23 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
You can use SIMILAR TO, something like it: SELECT MyColumn1, MyColumn2,, MyColumn3 FROM MyTable WHERE MyColumn1 SIMILAR TO '[[:DIGIT:]]*' Where just the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 are valid. If you need the decimal point too, try something like it, where the decimail

Re: [firebird-support] Test VARCAHR for numeric

2015-04-23 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Sorry, typo in the SELECT, just one comma after MyColumn2. Greetings. Walter. On Thu, Apr 23, 2015 at 8:00 PM, Walter R. Ojeda Valiente sistemas2000profesio...@gmail.com wrote: You can use SIMILAR TO, something like it: SELECT MyColumn1, MyColumn2,, MyColumn3 FROM MyTable

Re: [firebird-support] Test VARCAHR for numeric

2015-04-23 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Again, if you can read Spanish then the following article has more examples: https://firebird21.wordpress.com/2015/04/23/validando-que-el-contenido-de-un-char-o-varchar-sea-numerico/ Greetings. Walter. On Thu, Apr 23, 2015 at 8:03 PM, Walter R. Ojeda Valiente

Re: [firebird-support] Re: Awaiting Garbage Collector

2015-04-04 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much for your answer Alexey, I was very bussy these days. Looking at the page 46 it seems more understandable now. Greetings. Walter. On Wed, Mar 25, 2015 at 2:02 PM, Alexey Kovyazin a...@ib-aid.com [firebird-support] firebird-support@yahoogroups.com wrote: Hi Walter, On

Re: [firebird-support] Re: Awaiting Garbage Collector

2015-03-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hi Alexey Yes, that's right, I can not understand well the page 46. I suppose that R1 means record version 1, R2 means record version 2, etc. Tx16 did the INSERT? Tx12 can do a COMMIT although it had started before Tx16 and Tx18 is still active? Tx25 can change what Tx14 did although Tx14 is

Re: [firebird-support] Re: Awaiting Garbage Collector

2015-03-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Alexey Your presentation is an excellent work, as ever. I had wrote an article in my blog about it: https://firebird21.wordpress.com/2015/03/23/presentacion-sobre-transacciones-de-alexey-kovyazin/ You had explained very well everything and all can be easily understood. Thank you very

Re: [firebird-support] Get/set context in derived table context

2015-03-19 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
If you can read Spanish, this article shows several methods for having row numbers in the SELECT. https://firebird21.wordpress.com/2013/05/13/numerando-las-filas-de-un-select/ Greetings. Walter. On Thu, Mar 19, 2015 at 5:28 AM, masb...@za-management.com [firebird-support]

Re: [firebird-support] Multiple WHERE clauses

2015-02-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Sean: Which is the difference between it: WHERE 1 = CASE WHEN (Param 0) THEN 1 WHEN (Some OtherTest) THEN 1 WHEN (Yet another Test) THEN 1 ELSE 0 END and it: Param 0 OR SomeOtherTest OR YetAnotherTest ? Because I get the same result with both ways. Greetings. Walter. On Wed, Feb 25,

[firebird-support] Problem with a trigger

2015-02-03 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody In a before insert or update trigger I have the following cases: *Case 1:* IF (NEW.MVC_TIPMOV = 'SVT' AND INSERTING AND NEW.MVC_NRODOC = '1') THEN BEGIN END *Case 2:* IF (NEW.MVC_TIPMOV = 'SVT' AND INSERTING OR UPDATING AND NEW.MVC_NRODOC = '1') THEN BEGIN END *Case

Re: [firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-29 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you for your explanation Vlad, the proccess is more clear for me now. Greatings. Walter. On Mon, Dec 29, 2014 at 4:55 AM, hv...@users.sourceforge.net [firebird-support] firebird-support@yahoogroups.com wrote: Walter, there are few reasons: a) MVCC engine never block records - it

Re: [firebird-support] Deadlock exception occurs but it shouldn't?

2014-12-28 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Vlad, your explanation is very good, but I still don't understand something: Why before step 1 the engine does not blocks the record avoiding such problem? Greetings. Walter. On Sat, Dec 27, 2014 at 5:19 AM, hv...@users.sourceforge.net [firebird-support] firebird-support@yahoogroups.com wrote:

Re: [firebird-support] Deadlock exception occurs but it shouldn't?

2014-12-26 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Ann Maybe I am not understanding correctly, but: *Case 1:* - Transaction T1 starts with settings: READ WRITE WAIT READ COMMITTED - Transaction T1 updates a record which ID is 23 - Transaction T2 starts with settings: READ WRITE WAIT READ COMMITTED - Transaction T2 updates the

Re: [firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Bruce Yes, transaction T1 can block a row and transaction T2 will wait. But if transaction T2 blocks a row then transaction T1 can not wait and dead. Greetings. Walter. On Thu, Dec 25, 2014 at 7:27 AM, brucedickin...@wp.pl [firebird-support] firebird-support@yahoogroups.com wrote:

Re: [firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Strange, I will test it, too. Maybe I have a misconcept. Greetings. Walter. On Thu, Dec 25, 2014 at 11:36 AM, brucedickin...@wp.pl [firebird-support] firebird-support@yahoogroups.com wrote: Walter, I've tested what you've said. But it does not matter which transactions blocks record

Re: [firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Yes, you are right. I had a misconcept. Sorry. Greetings. Walter. On Thu, Dec 25, 2014 at 12:00 PM, Walter R. Ojeda Valiente sistemas2000profesio...@gmail.com wrote: Strange, I will test it, too. Maybe I have a misconcept. Greetings. Walter. On Thu, Dec 25, 2014 at 11:36 AM,

Re: [firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Bruce, if I understand transactions rightly the things are the following: - If you are updating or deleting just one row, then no conflict can happen with your settings. But if you want to update or delete several rows then conflicts can happens. - Transaction T1 starts, transaction T2 starts,

Re: [firebird-support] Re: performance of subselect with group by

2014-12-16 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Well done Set Greetings. Walter. On Tue, Dec 16, 2014 at 4:30 PM, Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support] firebird-support@yahoogroups.com wrote: I don't think there is any simple way to make a delete with a subselect as the only part of a where

Re: [firebird-support] Question about a package

2014-12-04 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
He also can have several versions of Firebird running on the same computer. Of course using different ports. Greetings. Walter. On Thu, Dec 4, 2014 at 5:06 AM, Markov Dmitri markovdmi...@yahoo.com [firebird-support] firebird-support@yahoogroups.com wrote: Hi! I can't answer on your

Re: [firebird-support] Why this similar to is wrong?

2014-11-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello I use the following SELECT when want to validate an e-mail address and works fine for me: SELECT IIF('em...@testdomain.com' SIMILAR TO '[[:ALNUM:]-*_*.*]*@[[:ALNUM:]-*_*.*]*.[[:ALNUM:]-*_*.*]*', 'ok', 'fail') FROM RDB$DATABASE Of course, that is not perfect, but works. Greetings.

Re: [firebird-support] Re: Gbak Restore - SuperServer vs. SuperClassic

2014-11-17 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hmmm, database dialect is 1. No issues with that? Greetings. Walter. On Mon, Nov 17, 2014 at 7:41 AM, 'Thomas Steinmaurer' t...@iblogmanager.com [firebird-support] firebird-support@yahoogroups.com wrote: Isnt the transaction per second wrongly calculated? Oops, sorry!!! I have been

[firebird-support] Number of the Next Transaction

2014-10-12 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Windows 7, 32 bits, SuperServer, Firebird 2.5.2 When nobody was using a database, writing the command GSTAT -h I saw the following numbers: OIT = 30287 OAT = 30288 OST = 30288 NT = 30289 After a cycle backup/restore (using GBAK -b and GBAK -c) in the new database the numbers were: OIT = 1 OAT =

Re: [firebird-support] Re: Number of the Next Transaction

2014-10-12 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much for your answer Dmitry. However my first question remains: why after a cycle backup/restore the Next Transaction was 304 and not 3? My understanding so far is that after a cycle backup/restore the ID of all transactions in the backup is put in 1. So, the Next Transaction would

  1   2   >