Re: [firebird-support] Multi-column Foreign key

2017-08-09 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
>> Let's create two unites from one lot: >> >> INSERT INTO UNITES (CODE, LOT, SITE, DESCRIPTION) VALUES ('A1', 'L1', 'S1', >> 'abc'); INSERT INTO UNITES (CODE, LOT, SITE, DESCRIPTION) VALUES ('A2', >> 'L1', 'S1', 'bcd'); >> >> I expected that the following instruction will not be exectued: >>

Re: [firebird-support] Multi-column Foreign key

2017-08-09 Thread 'livius' liviusliv...@poczta.onet.pl [firebird-support]
Hi, this is the feature – key is only valid(checked) for values but null is not “value”. This work same in all databases i have worked. regards, Karol Bieniaszewski From: Paweł Świerzko p_swier...@poczta.onet.pl [firebird-support] Sent: Wednesday, August 9, 2017 3:21 PM To:

[firebird-support] Multi-column Foreign key

2017-08-09 Thread Paweł Świerzko p_swier...@poczta.onet.pl [firebird-support]
Hi, I have encountered the following situation. Can you tell me - is it bug or feature. Excuse me if it is a silly question. I have two tables: CREATE TABLE UNITES ( CODE VARCHAR(10) NOT NULL, LOT VARCHAR(10) NOT NULL, SITE VARCHAR(10) NOT NULL,

Re: [firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Paul Vinkenoog p...@vinkenoog.nl [firebird-support]
Hi Vishal, > I would also like to know that if I need to learn Triggers and Stored > Procedures then what document should I refer, I am am new for triggers > and SP. Googling is random way I see. Would you refer any good books > for this? You'll find lots of free documentation under

Re: [firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
Hi Paul, You Rocks !!!n Yes It is working as expected. I would also like to know that if I need to learn Triggers and Stored Procedures then what document should I refer, I am am new for triggers and SP. Googling is random way I see. Would you refer any good books for this? Corrected Trigger

Re: [firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Paul Vinkenoog p...@vinkenoog.nl [firebird-support]
Vishal Tiwari vishuals...@yahoo.co.in [firebird-support] schreef op 09-08-2017 11:58: > I have put table name as Table_Name, which is actual table name. > > On Wednesday, 9 August 2017 3:27 PM, Vishal Tiwari > wrote: > > Hi Paul, > > I am getting below error while

Re: [firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
I have put table name as Table_Name, which is actual table name. On Wednesday, 9 August 2017 3:27 PM, Vishal Tiwari wrote: Hi Paul, I am getting below error while executing the trigger you shared. May be because of new FB version? I am executing using

Re: [firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
Hi Paul, I am getting below error while executing the trigger you shared. May be because of new FB version? I am executing using FlamRobin tool. Please see error below: *** IBPP::SQLException ***Context: Statement::Prepare( create trigger before update on Table_Nameasbeginif (new.col3 is

Re: [firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Paul Vinkenoog p...@vinkenoog.nl [firebird-support]
Hello Vishal, > I have one table say "MyTable", which has five columns, say Col1, > Col2,...,Col5 and it has 10 rows. Col5 is of Timestamp. > > My issue is, whenever I am updating Col3, that time, only for that row > of Col5, Timestamp value should be updated to the current timestamp. > > What

[firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
The timestamp should be updated in Col5 only when Col3 is updated and not for any other column update. On Wednesday, 9 August 2017 2:20 PM, Vishal Tiwari wrote: Hi All, I have one issue to share with you. I have one table say "MyTable", which has five columns,

[firebird-support] On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
Hi All, I have one issue to share with you. I have one table say "MyTable", which has five columns, say Col1, Col2,...,Col5 and it has 10 rows. Col5 is of Timestamp. My issue is, whenever I am updating Col3, that time, only for that row of Col5, Timestamp value should be updated to the current