LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   SQL update statement to SQL SERVER 2005 (http://www.linuxquestions.org/questions/programming-9/sql-update-statement-to-sql-server-2005-a-766793/)

scheidel21 11-04-2009 08:08 AM

SQL update statement to SQL SERVER 2005
 
I am trying to write an application to resequence some items based on being alphabetized. In order to do this I have to run a query to grab data from two table, I pull that down to a local dataset, work on the data then want to update it back to the database backend. The problem I am running into is it seems my Update statement sucks. It tells me that the column I want to update cannot be bound. Does anyone know the wording of an SQL update query to update a table that was modified through a query? Even if it is not MS SQL SERVER syntactically correct or specific anything could help me figure this out.

Thanks a lot

Alex

Clachair 11-04-2009 09:20 PM

My SQL
 
The syntax for updates is fairly simple; the example given in the mysql docs reads:
mysql> UPDATE pet SET birth = "1989" WHERE name = "Bowser";
and you should be able to test your application statement with a command line. If you have a syntax problem you'll get an error message.
Else http://dev.mysql.com/doc/
Also, don't forget to UNLOCK the table.

Good luck

John

scheidel21 11-05-2009 06:30 PM

Actually The issue I was having is that all the examples don't use a column from another table. But it is a moot point at this juncture. After a lot of research VB.NET OleDb cannot execute an update on a multitable query. I have had to rewrite the code and go an alternate route. Thank you for your input though, I appreciate it very much.


All times are GMT -5. The time now is 02:53 AM.