Re: trigger-dumping

2011-03-11 Thread Peter Brawley
any idea how to really purge my Vista machine for a really fresh start? How about installing a different OS :-) , or failing that a different version of Windows? I'm sorry, we declined to install Vista on any of our boxes. We've had no trouble upgrading to 5.5 from 5.1 on other Windows boxe

Re: trigger-dumping

2011-03-11 Thread S�ndor Hal�sz
2011/03/10 23:03 -0600, Peter Brawley On 3/10/2011 8:10 PM, h...@tbbs.net wrote: >MYSQLDUMP.EXE (Ver 10.13 Distrib 5.5.8, for Win32 (x86)) has flags for >trigger-dumping; the help that I downloaded for this version says it dumps >triggers--but it does not. Now what? Works here in 5.5.8

Re: Trigger?

2010-12-21 Thread Wagner Bianchi
t; > > Regards, > > > > Jerry Schwartz > > Global Information Incorporated > > 195 Farmington Ave. > > Farmington, CT 06032 > > > > 860.674.8796 / FAX: 860.674.8341 > > E-mail: je...@gii.co.jp > > Web site: www.the-infoshop.com > > &g

RE: Trigger?

2010-12-21 Thread Jerry Schwartz
@lists.mysql.com Subject: Re: Trigger? Well, to produce this result, the first thing that we have to do is to get rid of the NOT NULL constraint of the column `foo`. After it, the 'null' can be sent within a INSERT statement, as below: mysql> show create table testtrigger\G *

RE: Trigger?

2010-12-21 Thread Jerry Schwartz
eb site: www.the-infoshop.com >-Original Message- >From: Michael Dykman [mailto:mdyk...@gmail.com] >Sent: Monday, December 20, 2010 6:25 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Trigger? > >The expression you supplied looks right enough.. how was

Re: Trigger?

2010-12-20 Thread Wagner Bianchi
Well, to produce this result, the first thing that we have to do is to *get rid of* the NOT NULL constraint of the column `foo`. After it, the 'null' can be sent within a INSERT statement, as below: mysql> show create table testtrigger\G *** 1. row ***

Re: Trigger?

2010-12-20 Thread Michael Dykman
The expression you supplied looks right enough.. how was it declared? as an on UPDATE/on INSERT trigger or just a single case? - michael dykman On Mon, Dec 20, 2010 at 5:21 PM, Jerry Schwartz wrote: > I've never used a trigger before, and I want to make one that sounds like it > should be si

Re: trigger

2009-11-04 Thread Phil
esday, November 04, 2009 2:33 PM > To: 'Phil'; Mysql; 'Stefan Onken' > Subject: RE: trigger > > 1. Triggers must have FOR EACH ROW -- it's described in the manual: > http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html > > So the correct syntax wo

RE: trigger

2009-11-04 Thread Gavin Towey
Oops, one more mistake: NOW()-60*60*24*5 isn't the way to do date math. It should be: NOW() - INTERVAL 5 DAY -Original Message- From: Gavin Towey Sent: Wednesday, November 04, 2009 2:33 PM To: 'Phil'; Mysql; 'Stefan Onken' Subject: RE: trigger 1. Trigge

RE: trigger

2009-11-04 Thread Gavin Towey
- From: freedc@gmail.com [mailto:freedc@gmail.com] On Behalf Of Phil Sent: Wednesday, November 04, 2009 11:42 AM To: Mysql Subject: Re: trigger You are missing a BEGIN in the trigger delimiter | CREATE TRIGGER greylist AFTER INSERT on greylist BEGIN delete from greylist where first_see

Re: trigger

2009-11-04 Thread Phil
You are missing a BEGIN in the trigger delimiter | CREATE TRIGGER greylist AFTER INSERT on greylist BEGIN delete from greylist where first_seen < NOW()-60*60*24*5; END; | delimiter ; Phil On Wed, Nov 4, 2009 at 2:28 PM, Stefan Onken wrote: > Hello, > > I am new to using triggers in mysql. I

Re: trigger

2009-11-04 Thread Michael Dykman
Well you might need to parenthesize the expression, but note that simple integer math done on a DATE or DATETIME, the units are days. you probably want ... where first_seen < (NOW() - 5); michael dykman On Wed, Nov 4, 2009 at 2:28 PM, Stefan Onken wrote: > Hello, > > I am new to using trigg

Re: Trigger and "Warning: #1265 Data truncated"

2009-06-09 Thread Keith Edmunds
> Curdate() returns a datetime, which you are pushing into a date field. > It is truncating the time part. Just truncate it and you should be > fine :) Hmmm. Not according to http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_curdate or, indeed, experiments: mysql> selec

Re: Trigger and "Warning: #1265 Data truncated"

2009-06-05 Thread Walter Heck - OlinData.com
Curdate() returns a datetime, which you are pushing into a date field. It is truncating the time part. Just truncate it and you should be fine :) Walter On Fri, Jun 5, 2009 at 5:56 AM, Keith Edmunds wrote: > I'm very new to triggers, so I suspect I've done something naive. > > When a row is inser

RE: Trigger working with server 5.0.51 but not 5.0.22

2009-05-13 Thread Rolando Edwards
The DROP TRIGGER command is in the wrong place. You changed the delimiter to $$ but still tried to use the semicolon(;) with DROP TRIGGER. Your code should read like this: DROP TRIGGER IF EXISTS cfe_tg_calcular_consumos; DELIMITER $$ CREATE TRIGGER cfe_tg_calcular_consumos AFTER I

Re: Trigger working with server 5.0.51 but not 5.0.22

2009-05-13 Thread Mattia Merzi
2009/5/13 Mauricio Tellez : > Hi, I'm developed a trigger with mysql version 5.0.51(ubuntu), and when I > tried to move this to a production server (version 5.0.22 fedora) I ran into [...] > but mysql say there is an error near EXISTS cfe_tg_calculas_consumos. Of http://dev.mysql.com/doc/refman/5.

Re: trigger that calls a webservice??

2008-06-20 Thread Antony T Curtis
On 20 Jun 2008, at 06:43, James wrote: On Fri, June 20, 2008 9:12 am, robert rottermann wrote: Hi there, is it possible to define an update trigger that calls a webservice (or just some external method that would do it). we have a web frontent, that does the indexing of data in its own c

Re: trigger that calls a webservice??

2008-06-20 Thread Mark Leith
James wrote: On Fri, June 20, 2008 9:12 am, robert rottermann wrote: Hi there, is it possible to define an update trigger that calls a webservice (or just some external method that would do it). we have a web frontent, that does the indexing of data in its own catalog (zope/plone). so I wou

Re: trigger that calls a webservice??

2008-06-20 Thread James
On Fri, June 20, 2008 9:12 am, robert rottermann wrote: > Hi there, > is it possible to define an update trigger that calls a webservice (or > just some external method that would do it). > > we have a web frontent, that does the indexing of data in its own catalog > (zope/plone). > so I would lik

Re: Trigger problem

2008-05-25 Thread Paul DuBois
On May 15, 2008, at 4:30 AM, rustam ershtukaev wrote: I have been trying to write a trigger in mysql, but can't get it to work. It's really simple,i just need my trigger to add varchar value to a table on insert if postcode = 1000. Where does postcode come from? Your SELECT statement appea

Re: Trigger problem

2008-05-15 Thread Rob Wultsch
On Thu, May 15, 2008 at 2:30 AM, rustam ershtukaev <[EMAIL PROTECTED]> wrote: > I have been trying to write a trigger in mysql, but can't get it to > work. It's really simple,i just need my trigger to add varchar value to > a table on insert if postcode = 1000. > > this is how i did it: > > delimit

RE: trigger question..

2007-12-19 Thread bruce
uldn't be set prior to the row being created... any more pointers/thoughts/... thanks -Original Message- From: joe [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 7:33 PM To: 'bruce'; 'mysql list' Subject: RE: trigger question.. create ta

RE: trigger question..

2007-12-19 Thread joe
create table foo (aa varchar(20), id integer, cc varchar(20)); delimiter | create trigger foo_ins before insert on foo for each row begin set new.aa = concat(new.cc,'-',new.id); end; | delimiter ; insert into foo (cc,id) values ('www',1); select * from foo; -Original Message

Re: trigger question...

2007-12-11 Thread Martijn Tonies
Hi Bruce, > delimiter | > create trigger mfgtst after insert on masterHostTBL > > for each row begin > set @tmp = 55; > insert into masterTestResultStartTBL > set hostID = NEW.id, > testResultVal = 88; > > /* > set @q = masterTestResultStartValTBL.serverStartVal

Re: Trigger problem

2007-11-13 Thread Scott
On Thu, 2007-11-08 at 17:56 -0800, Lucky Wijaya wrote: > Yes, the trigger code is works. Many thanks !! > Now I understand the use of delimiter command. Thanks again... =) > > My next question is, do we able to view the triggers that has been created ? > And how ? > > David Schneider-Joseph <[E

Re: Trigger problem

2007-11-08 Thread Lucky Wijaya
Yes, the trigger code is works. Many thanks !! Now I understand the use of delimiter command. Thanks again... =) My next question is, do we able to view the triggers that has been created ? And how ? David Schneider-Joseph <[EMAIL PROTECTED]> wrote: My apologies, try this: > DELIMITER ;; > > CR

Re: Trigger problem

2007-11-07 Thread David Schneider-Joseph
My apologies, try this: DELIMITER ;; CREATE TRIGGER DEL_TB_INSTRUKSI AFTER DELETE ON Tb_Instruksi FOR EACH ROW BEGIN DELETE FROM Tb_Stuffing WHERE No_Instruksi = OLD.No_Instruksi; END; ;; DELIMITER ; To answer your question: The DELIMITER statement tells MySQL to use a different set of c

Re: Trigger problem

2007-11-06 Thread Lucky Wijaya
No, I didn't set the delimiter. But, it still have an error after I set delimiter in my trigger as your example. By the way, what's delimiter mean ? And what it's for ? Thanks to you Mr. David. David Schneider-Joseph <[EMAIL PROTECTED]> wrote: Lucky, Did you make sure to set your delimiter bef

Re: Trigger problem

2007-11-06 Thread David Schneider-Joseph
Lucky, Did you make sure to set your delimiter before and after the CREATE TRIGGER statement? e.g.: DELIMITER ;; CREATE TRIGGER DEL_TB_INSTRUKSI AFTER DELETE ON Tb_Instruksi FOR EACH ROW BEGIN DELETE FROM Tb_Stuffing WHERE No_Instruksi = OLD.No_Instruksi; END;; DELIMITER ; On Nov 6, 2007

Re: Trigger

2007-10-12 Thread Martijn Tonies
>Mostly because use 2 field to represent the same data is a waste of storage i think. Oh, ok. So you're sending a non-date value and you want to transform it into an actual character presentation of a date value, but making things easier on yourself is a waste of storage. Feel free to continu jum

Re: Trigger

2007-10-12 Thread Patricio A. Bruna
Mostly because use 2 field to represent the same data is a waste of storage i think. - "Martijn Tonies" <[EMAIL PROTECTED]> escribió: > >The aplication which is writing to the database is sending the date > in unix > format. > >I can't no change that, so i suposse using a triger will help. >

Re: Trigger

2007-10-12 Thread Martijn Tonies
>The aplication which is writing to the database is sending the date in unix format. >I can't no change that, so i suposse using a triger will help. > >The application pass the 'xx.xx' value when is inserting to the table. Righto. Well, what does this mean then: >im converting the unixtime to

Re: Trigger

2007-10-12 Thread Patricio A. Bruna
The aplication which is writing to the database is sending the date in unix format. I can't no change that, so i suposse using a triger will help. The application pass the 'xx.xx' value when is inserting to the table. - "Martijn Tonies" <[EMAIL PROTECTED]> escribió: > >If i define that t

Re: Trigger

2007-10-12 Thread Martijn Tonies
>If i define that the value for the field must be varchar data type, `fecha` varchar(25) default NULL, the triger records the right date. >I think because is wrinting a string only. But if i define the field as a date data type, `fecha` date default NULL, the value writen is: 1969-31-12. I suppose

Re: Trigger

2007-10-12 Thread Patricio A. Bruna
Martijn, If i define that the value for the field must be varchar data type, `fecha` varchar(25) default NULL, the triger records the right date. I think because is wrinting a string only. But if i define the field as a date data type, `fecha` date default NULL, the value writen is: 1969-31-12. I

Re: Trigger

2007-10-12 Thread Martijn Tonies
Hi, > I have a problem with a trigger which should conver a unix timestamp to a MySQL date datatype. > The trigger works if the column is varchar, but when the column is date type, it write the date of 1969-31-12. Instead of "column", I guess you mean "value"? > Any ideas? > > > > DROP TABLE IF

Re: Trigger

2007-10-11 Thread Patricio A. Bruna
Michael, im converting the unixtime to "normal" time with from_unixtime. So after i did the convertion i write the result to the table. It works ok when i write to a varchar column, but not to a date column - "Michael Dykman" <[EMAIL PROTECTED]> escribió: > That is a common symptom of some con

Re: Trigger question

2007-05-30 Thread Olaf Stein
Baron, Thanks a lot Adding the columns to the end works... Olaf On 5/30/07 2:13 PM, "Baron Schwartz" <[EMAIL PROTECTED]> wrote: > Hi, > > Olaf Stein wrote: >> Hey all, >> >> I asked this before (a while back) and have gotten some answers that solve >> my problem partially only. >> >> --

RE: Trigger question

2007-05-30 Thread Jerry Schwartz
Will a SELECT * FROM work there? I'm not using 5.x, so I haven't really investigated triggers; this is just a guess. Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpr

Re: Trigger question

2007-05-30 Thread Baron Schwartz
Hi, Olaf Stein wrote: Hey all, I asked this before (a while back) and have gotten some answers that solve my problem partially only. --- old message -- I have a table with 205 columns. When an update statement updates a row in this table I want a trigger that creates a record of t

RE: Trigger OLD question

2007-05-09 Thread emierzwa
You might try: INSERT INTO table_track select OLD.*; -Original Message- From: Olaf Stein [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 09, 2007 2:59 PM To: MySql Subject: Trigger OLD question Hi All, I have a table with 205 columns. When an update statement updates a row in this tab

Re: Trigger OLD question

2007-05-09 Thread Paul DuBois
At 4:59 PM -0400 5/9/07, Olaf Stein wrote: Hi All, I have a table with 205 columns. When an update statement updates a row in this table I want a trigger that creates a record of the old row in a separate table. The following works fine when not too many columns need to be written into the other

Re: trigger

2007-02-21 Thread Winn Johnston
I keep getting this error ERROR 1415 (0A000): Not allowed to return a result set from a trigger --- Rolando Edwards <[EMAIL PROTECTED]> wrote: > insert into max_donations (donation_id, contact_id) > select donation_id, contact_id > from donation_test where conatct_id = (You > m

Re: trigger

2007-02-21 Thread Rolando Edwards
insert into max_donations (donation_id, contact_id) select donation_id, contact_id from donation_test where conatct_id = (You missppelled contact_id) NEW.contact_id and total_amount = contact_max_amount; - Original Message - From: "Winn Johnston" <[EMAIL PROTECTED]> To: m

Re: trigger mysql 5

2006-05-19 Thread sheeri kritzer
You have to change the delimiter you use, otherwise MySQL treats the ; as the end of the line and processes the commands. When I tried to run your trigger (with the standard delimiter of ;) I got: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your

RE: Trigger exception handling

2005-08-25 Thread Burke, Dan
ully obvious reasons, I don't use Oracle for personal projects, so triggers are a feature I've longed for in MySQL. Dan. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 25, 2005 4:16 PM To: Burke, Dan Cc: mysql@lists.

RE: Trigger exception handling

2005-08-25 Thread SGreen
"Burke, Dan" <[EMAIL PROTECTED]> wrote on 08/25/2005 03:42:18 PM: > I don't think this is really what I'm looking for. > > What I need is to be able to perform certain validation on the data from > within the trigger. If that validation fails, then I need the trigger > to abort with an error. T

RE: Trigger exception handling

2005-08-25 Thread Burke, Dan
rrent PL/SQL triggers, this is just the most basic example. I'm getting the feeling I'm pretty rare in this situation. Thanks, Dan. -Original Message- From: Peter Brawley [mailto:[EMAIL PROTECTED] Sent: Friday, August 19, 2005 10:52 AM To: Burke, Dan Cc: mysql@lists.mysql.com Su

Re: Trigger Lock table

2005-08-22 Thread Gleb Paharenko
Hello. > Have anyone an hind for, why this trigger Lock the Table Customer ?? I was unable to reproduce this problem on my ALT Linux system, but I've noticed one server crash during my tests. Please, could you send a reproducible test case. Use the output of SHOW CREATE TABLE to provide ex

Re: Trigger exception handling

2005-08-19 Thread Peter Brawley
Dan, See http://dev.mysql.com/doc/mysql/en/declare-handlers.html. Here's a wee example... USE test ; SET @err = 0 ; SELECT 'Before running errhandlerdemo:', @err ; CREATE TABLE IF NOT EXISTS testhandler (i INT, PRIMARY KEY(i)) ; SET GLOBAL log_bin_trust_routine_creators=TRUE DROP PROCEDURE IF

Re: Trigger and StoreProc Examples

2004-05-31 Thread Victoria Reznichenko
"Carlos J Souza" <[EMAIL PROTECTED]> wrote: > Hello ALL, > > I need a examples of stored procedures and triggers in mysql 5.0. > > Please send me all sintaxes of this > Triggers are not supported in v5.0. Example of stored procedure you can find in the manual at: http://dev.mysql.com/do

Re: Trigger

2002-12-05 Thread Bruce MacDonald
Neal, > I need to build a cache mechanism for a website and I thought I'd use MySQL > for persistance. The problem is that I need it to schedule a cleanup task > every 24 hours - to remove old cache records. MS SQL Server provides a > trigger for scheduling such tasks - I am looking for the func

Re: Trigger

2002-12-05 Thread Gerald R. Jensen
Neal: What you are really asking is: "Does MySQL support stored procedures?" The answer is ... at this point ... no. Implementation of stored procedures is on the 'to-do' list, but it will be awhile before you see it. There are some work-arounds ... do a search of the archive for this list, or p

Re: trigger function

2001-07-23 Thread Benjamin Pflugmann
Hello. On Mon, Jul 23, 2001 at 09:34:17AM -0600, [EMAIL PROTECTED] wrote: > Please Help! > > I can't find trigger functions in the documents. Does MySQL has triggers > for preselect, preupdate, and predelete? If do, where can I find them? Please have a look at the following chapter in the fine

Re: trigger

2001-02-14 Thread Dennis B. Manlangit
Yes it is... thanks... but not really. I need a trigger that will execute a program if a particular row has been added to the table. Something like the trigger feature of postgreSQL. Dennis At 12:59 AM 2/15/01 -0300, Fábio Ottolini wrote: >Well... I have created a trigger using Perl and cront

Re: trigger

2001-02-14 Thread Fábio Ottolini
Well... I have created a trigger using Perl and crontab (Linux). But I could use C, C++, PHP and so on... Is that relevant to your question? - Original Message - From: "Dennis B. Manlangit" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 14, 2001 10:34 PM Subject: tr