update

mysql reference result from subquery

this is what i am doing update t1 set x=a,y=b where a and b are obtained from (select query here) i know the select query the select query returns multiple results which are the same when i use group by or distinct query execution slows down considerably a and b are forward references so mysql reports an error i want to set a equal t...

PHP/MySQL Swap places in database + JavaScript (jQuery)

I'm currently developing a website which stores bookmarks in a MySQL database using PHP and jQuery. The MySQL for bookmarks looks like this (CSV format): id,userid,link_count,url,title,description,tags,shareid,fav,date "1";"1";"0";"img/test/google.png";"Google";"Best. Search Engine. Ever.";"google, search, engine";"7nbsp";"0";"12675789...

RIA Services EntitySet does not support 'Edit' operation

Hello everbody! Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created an EF Model (no POCOs), generic repository on top of it and a RIA Service(hosted in an ASP.NET MVC application) and tried to get data from within the ASP.NET MVC application: worked well. Next step: Silverlight client. Got a refe...

The "Update" button in ArcFM Attribute Editor is disabled.

I am not been able to update any of the attributes in one of my feature classes using the Arc FM Attribute editor, but I am able to update it thru the ESRI Attribute editor. Please lemme know if somebody knows the reason. I am using Arc SDE 9.3.1 with ArcFM 9.3 and ArcMap 9.3 Note:I am in selection Tab and not in Target tab. Please...

There's a way to avoid AppleStore?

Hi, i need to develop an iPhone application that is a Client of serverside application. This application is not for customer but for sell agents. I know that if i try to send to Apple to put on Apple Store they reject it because the application have no sense for Apple Store. The company is small so i can't use the Enterprise program. The...

update myqsl table

how can i write the query, to update the table videos, and set the value of field name to 'something' where the average is max(), or UPDATE the table, where average has the second value by size!!! i think the query must look like this!!! UPDATE videos SET name = 'something' WHERE average IN (SELECT `average` ...

How to update two tables in a single query in MS SQL

Is it be possible to update two tables writing a single query? So that i do not have to execute two queries and to track whether both are successful? ...

Update table of two different database

This is the query to update table in one database that is of other Update test.temp a, test2.temp b Set a.name=b.name Where a.no=b.no; Now I don't want to write every field i.e a.name=b.name Is there any solution? ...

HQL multiple updates. Is there a better way?

I have a Map, that I want to persist. The domain object is something like this: public class Settings { private String key; private String value; public String getKey() { ... } public String getValue() { ... } public void setKey(String key) { ... } public void setValue(String value) { ... } } The standard appr...

Populate column from table X with value from table Y

A fellow developer changed all the values in the userid column of table map. I need them changed back, because userid is also a key in the profiles table. Thankfully, for reasons that aren't worth going into, map and profiles share another column in common, employeeId. So I'd like to take all the values for userid as found in profiles...

SQL query help - merge a value to all rows in a column

I'm trying to migrate a site from a joomla system to a drupal. The problem is that drupal needs filename and sourcepath in the same row, but joomla only has filename. I'm looking for a way to add sourcepath before the filename in all the rows in that column. I'm figuring it's the UPDATE statement that I should use, but I can't figure out...

I've got to update a column in one SQL table with a counter stored in another table, and update that table too

I'm using SQL server 2005 (for testing) & 2007 (for production). I have to add a unique record ID to all the records in my table, in an existing column, using a "last record ID" column from another table. So, I'm going to do some sort of UPDATE of my table, but I have to get the "last record ID" from the other table, increment it, upd...

Update RHEL 5.1 to 5.4

Hi all, I have a server currently running RHEL 5.1, and I would like to upgrade it to RHEL 5.4. The server is not connected to the Internet, so I don't think I can use "yum update". How would I be able to upgrade my server, and is it just a small-scale upgrade, like Windows patches, leaving everything on the server intact, or would it...

how to atomically claim a row or resource using UPDATE in mysql

i have a table of resources (lets say cars) which i want to claim atomically. I then want information about which resource I just claimed. If there's a limit of one resource per one user, i can do the following trick: UPDATE cars SET user = 'bob' WHERE user IS NULL LIMIT 1 SELECT * FROM cars WHERE user = 'bob' This way, I claim the ...

Change update value of property (LINQTOSQL)

Hi... I've got an entity object - Customer, with a property called VATRate. This VATRate is in the form of a decimal (0.25). I wanted to be able to enter a percentage value, and save it in the correct decimal value in the database, so I made this custom property: partial class Customer{ public decimal VatPercent { get{ .....

update div after jeditable submit in rails

i want to submit the text from jeditable, store it in the database and then i don´t want to render the updated text back to jeditable field, i want to update the whole div in which the jeditable field (and maybee other text fields) is. f.e. i change the username via jeditable inplace editor, then i store the changes in the db and now...

Correcting an UPDATE statement (and making it more secure!)

I'm trying to a single value in my DB...When I run it through the console, it works correctly (as I'm replacing the variables with numbers and text).. However, My query is not returning a value for book ID when I insert the PHP variable for it.. It's because the book_id is unpopulated... $query = "UPDATE books " . "SET readstatus...

SQL Server Update with left join and group by having

I'm making an update to our datbase and would like to update rows that do not have existing items in another table. I can join the tables together, but am having trouble grouping the table to get a count of the number of rows UPDATE dpt SET dpt.active = 0 FROM DEPARTMENT dpt LEFT JOIN DOCUMENTS doc on dpt.ID = doc.DepartmentID GROUP ...

How to update multiple rows with different values in mysql?

I have a table with a column 'A'. Some rows have 14 digits for the column 'A' and some have only 12. I need to transform all the entries to 14 digits. The datatype is varchar I would like to update all the rows at once (one query), adding zeros before the first digit, so an entry like 012345678910 would become 00012345678910. Is it po...

Update table using cursor but also update records in another table

I'm updating the IDs with new IDs, but I need to retain the same ID for the master record in table A and its dependents in table B. The chunk bracketed by comments is the part I can't figure out. I need to update all the records in table B that share the same ID with the current record I'm looking at for table A. DECLARE CURSOR_A CUR...