LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 11-04-2009, 09:08 AM   #1
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,287

Rep: Reputation: 97
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
 
Old 11-04-2009, 10:20 PM   #2
Clachair
LQ Newbie
 
Registered: Dec 2008
Location: New York
Distribution: Red Hat 7.2
Posts: 4

Rep: Reputation: 0
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

Last edited by Clachair; 11-04-2009 at 10:24 PM.
 
Old 11-05-2009, 07:30 PM   #3
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,287

Original Poster
Rep: Reputation: 97
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.
 
  


Reply

Tags
cannot, sql, update


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL statement assembler for C++? ta0kira Programming 3 03-07-2009 03:16 AM
LXer: Review: Microsoft SQL Server 2005 Unleashed LXer Syndicated Linux News 0 05-11-2007 12:16 AM
[SOLVED] Managing Microsoft SQL Server 2005 on linux Blue_Ice Linux - Enterprise 1 10-03-2006 11:48 AM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 03:20 PM
SQL statement glj Programming 1 10-12-2001 10:29 AM


All times are GMT -5. The time now is 07:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration