LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 08:08 AM   #1
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
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, 09: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 09:24 PM.
 
Old 11-05-2009, 06:30 PM   #3
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

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



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 02:16 AM
LXer: Review: Microsoft SQL Server 2005 Unleashed LXer Syndicated Linux News 0 05-10-2007 11:16 PM
[SOLVED] Managing Microsoft SQL Server 2005 on linux Blue_Ice Linux - Enterprise 1 10-03-2006 10:48 AM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 02:20 PM
SQL statement glj Programming 1 10-12-2001 09:29 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:13 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
Open Source Consulting | Domain Registration