update

How to make a MySQL trigger run only when at least one OLD field is different from NEW fields ?

Hi, I am trying to audit table changes on MySQL but i want the "before update" trigger to run (add a line into an audit table) only when there is at least one changed field. Is there a way to easily check all fields for changes between OLD and NEW ? Thank you ! ...

Updating QT version of OpenSuse

Hi All, I'm using OpenSuse 11.2 which has QT 4.5.3. Can I update it's QT to version 4.6? if yes, how? Thanks... ...

Update html text box while Javascript is running

Hi, I have an html file that accepts user inputs then uses Javascript to calculate a value based on those inputs. That result is then displayed in an input box after the program has finished. What I'd like to do is make it so that when you click on the button to run the javascript, the input box that displays the result will show 'Cal...

Ibatis+Oracle: How to update a float value

I'm trying to update a float value in oracle database, but the saved value is only the integer part of the float value. I'm using the expression update TABLE SET VALUE = #value:NUMERIC# WHERE ID = #id# The Value is defined as Number(19,4) NULL ...

tsql : update table with case statement - whats wrong with it?

I have the following update statement : UPDATE D SET D.Xtra1 = CASE when ExtendedProperties.PropertyName="Transmittal Number" then ExtendedProperties.PropertyValue else NULL END, D.Xtra2 = CASE when (ExtendedProperties.PropertyName="File Identificati...

jsonreststore.deleteItem() dojox.grid.datagrid not updated

Hi, as long as i know, the dojox.grid.datagrid should be "data aware" wich means, if i delete an item from the jsonreststore, it should get deleted from the datagrid too... but - the grid is updated only if there is an error in the json-resonse from the delete-Request. If i return 204 as status code, nothing happens (in the grid, the d...

Mysql cross table update permission problem

I'm doing a MySQL query similar to following: UPDATE my_articles a LEFT JOIN categorylinks cl ON a.pageid = cl.cl_from SET a.importance = 'High' WHERE cl.cl_to = 'High' The problem is, I don't have a UPDATE right for the categorylinks table (I do have that right for my_articles), so the query fails with the message UPD...

Not exists in a update statement takes more time

In MySQL, update table1 t1 set column1 = 100, column2 = 200 where column3 > 500 and not exists(select * from table2 where column1 = t1.column1); This query is too time consuming to execute, do have any other faster way of rewriting. for table2 ID is a primary column so i guess ...

SQL statement to update a percentage change

Hi guys. I have searched S.O. for this answer and have came close to an answer but still not close enough. I am interested in knowing if MySQL has this capability. I have developed in Perl and MySQL 4 and I'm on MySQL 4 now. My table looks like this... symbol varchar(25) todayDate date interest int(11) My problem is this.....these s...

what is the fastest way to update thousands rows in mysql

lets assume you have a table with 1M rows and growing ... every five minutes of every day you run a python programm which have to update some fields of 50K rows my question is: what is the fastest way to do the work? runs those updates in loop and after last one is executed than fire up a cursor commit? or generate file and than ru...

update a field to null or delete row if another field is null MYSQL

I am looking for the most efficient way to update a table in the following way. If field A has a value in it and the contents of field b are being removed (null)then just update field b to null If field A has no value in it and field b is being updated to null then delete row. I'm a MYSQL newbie and am aware of insert/update/delete bu...

updating a table column based on another tables results using mysql only

Hi everyone I have a set of results - SELECT id FROM recruit_index WHERE YEAR NOT LIKE '2011' I need to update another table column based on each of the above ids using mysql only. Could anyone point me in the right direction? Thanks in advance Mike ...

Update WPF ListBoxItem without ListBox.Items.Refresh()?

I have a DataTemplate that I use to display details from a class in a ListBox. The DataTemplate has an EventTrigger attached to the (item) Loaded event that uses a DoubleAnimation to fade each item into view as they are added to the ObservableCollection that is bound to the ListBox. It also has a DataTrigger that uses a DoubleAnimation ...

Get count of records affected by INSERT or UPDATE in Postgres

My database driver for Postgres 8/9 does not return a count of records affected when executing INSERT or UPDATE. Postgres offers the non-standard syntax "RETURNING" which seems like a good workaround. But what might be the syntax? The example returns the ID of a record, but I need a count. INSERT INTO distributors (did, dname) VALU...

Update live website from button?

I have this idea which I'm not really sure how to implement. The idea would be that we have a given product implemented in various sites, and the product itself would have a page with a button (let's say it's www.site.com/update) and once you click the button the site goes offline and retrieves the latest version of itself from an onlin...

NHibernate SchemaUpdate adding existing foreign keys again?

I'm using SchemaUpdate to synchronize my hbms with existing database. Database has recently created based on hbms and is completely up-to-date. But SchemaUpdate generates all foreign key constraints again. For example suppose you have Student and Teacher. Student has association to Teacher with name ArtTeacher. ArtTeacher is a foreign ...

After Word Press Update (Latest) the Content does not appear ? how to Fix?

after updating my web site, the content does not appear but the comments appear. I disabled all the plugins but still no content appear. how can I see and solve the problem of My WordPress? http://www.dugunarabasi.com/araclarimiz/1937-cadillac-la-salle-limousine/ ...

mysql question - way to update case for field?

I have some entries in a field that look like this: NEvada city or nevada City... Is there a way to update the database so that entries have initial caps: Nevada City? ...

How to select and update a record at the same time in mySQL?

Is there any way to select a record and update it in a single query? I tried this: UPDATE arrc_Voucher SET ActivatedDT = now() WHERE (SELECT VoucherNbr, VoucherID FROM arrc_Voucher WHERE ActivatedDT IS NULL AND BalanceInit IS NULL AND TypeFlag = 'V' LIMIT 1 ) which I hoped would run the...

What is the best way to write code that first checks if a row exists and updates or inserts it accordingly?

I am rather new to the more modern ways of coding database persistence, and my intuition is telling me I probably am missing something because my code seems "inelegant" but I do not see another way to do it. Note: I understand maybe Linq to SQL is considered "dead". I'm more in a "learning the concepts" mode assuming that I can probabl...