473,779 Members | 2,089 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is wrong? Update value from one database to another

1 New Member
Hio,

I want to update teh database Slim98 with some values out of database Slim0.
The databasestructu re is equal.

update Slim98.dbo.arti cle
set Slim98.dbo.arti cle.insurancein ventory = Slim0.dbo.artic le.insuranceinv entory,
Slim98.dbo.arti cle.overwriteBu fferStock = Slim0.dbo.artic le.overwriteBuf ferStock,
Slim98.dbo.arti cle.insInvDateS et = Slim0.dbo.artic le.insInvDateSe t
where Slim98.dbo.arti cle.code = Slim0.dbo.artic le.code and Slim98.dbo.arti cle.warehouse = 'M01-'

getting message:

Server: Msg 107, Level 16, State 3, Line 1
The column prefix 'Slim0.dbo.arti cle' does not match with a table name or alias name used in the query.
Server: Msg 107, Level 16, State 1, Line 1
The column prefix 'Slim0.dbo.arti cle' does not match with a table name or alias name used in the query.
Server: Msg 107, Level 16, State 1, Line 1
The column prefix 'Slim0.dbo.arti cle' does not match with a table name or alias name used in the query.
Server: Msg 107, Level 16, State 1, Line 1
The column prefix 'Slim0.dbo.arti cle' does not match with a table name or alias name used in the query.
Feb 6 '08 #1
1 2377
ck9663
2,878 Recognized Expert Specialist
Hio,

I want to update teh database Slim98 with some values out of database Slim0.
The databasestructu re is equal.

update Slim98.dbo.arti cle
set Slim98.dbo.arti cle.insurancein ventory = Slim0.dbo.artic le.insuranceinv entory,
Slim98.dbo.arti cle.overwriteBu fferStock = Slim0.dbo.artic le.overwriteBuf ferStock,
Slim98.dbo.arti cle.insInvDateS et = Slim0.dbo.artic le.insInvDateSe t
where Slim98.dbo.arti cle.code = Slim0.dbo.artic le.code and Slim98.dbo.arti cle.warehouse = 'M01-'

getting message:

Server: Msg 107, Level 16, State 3, Line 1
The column prefix 'Slim0.dbo.arti cle' does not match with a table name or alias name used in the query.
Server: Msg 107, Level 16, State 1, Line 1
The column prefix 'Slim0.dbo.arti cle' does not match with a table name or alias name used in the query.
Server: Msg 107, Level 16, State 1, Line 1
The column prefix 'Slim0.dbo.arti cle' does not match with a table name or alias name used in the query.
Server: Msg 107, Level 16, State 1, Line 1
The column prefix 'Slim0.dbo.arti cle' does not match with a table name or alias name used in the query.

i think you're missing the FROM CLAUSE

try something like:
update Slim98.dbo.arti cle
set Slim98.dbo.arti cle.insurancein ventory = Slim0.dbo.artic le.insuranceinv entory,
Slim98.dbo.arti cle.overwriteBu fferStock = Slim0.dbo.artic le.overwriteBuf ferStock,
Slim98.dbo.arti cle.insInvDateS et = Slim0.dbo.artic le.insInvDateSe t
FROM SLIM0.DBO.ARTIC LE
where Slim98.dbo.arti cle.code = Slim0.dbo.artic le.code and Slim98.dbo.arti cle.warehouse = 'M01-'


-- ck
Feb 6 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

125
14850
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
3
1549
by: Terry Olsen | last post by:
I've got 2 different web pages, both updating the same SQL database. One is for the Technician and one is for the Manager. The technician's update page works fine but the Manager's update page doesn't. They are both the same..as far as I can tell... --------------------- This code works fine, updating the SQL database with the edited data. Code for Tech Page
5
2386
by: hans.bonefaas | last post by:
Hi all, I hope someone can help me with the following problem in ASP.net. I want to edit the information for a record in a database (MS Access). On the page I placed several textboxes and dropdownlistboxes. In the page_load the information from the database is loaded a dataset. With the following command I place the info from the dataset in the boxes: txtFirstName.Text = ds.Tables(0).Rows(0).Item("FirstName")
4
2150
by: Jonathan Upright | last post by:
Greetings to anyone who can help: I'm using WebMatrix to make ASP.NET pages, and I chose the "Editable DataGrid" at the project selector screen. As you may know, it defaults to the Microsoft SQL database "pubs". I've followed the instructions in the comments and also changed everything pertaining to SQL over to OLEDB. (i.e. Changed SqlDbType. to OleDbType.) I also changed the datafield names and variable names accordingly. The page...
3
3290
by: Reney | last post by:
I haven't used the VS Studio's drag&drop method to create my connection, adapters and datasets, but I typed them all. The situation is like this: There is a listbox with members pulled from the database.(I am using an access db). The user selects one value from the listbox and clicks on one of two buttons "ThisWeek" or "LastWeek". The button click events each has its own SQL statement, pulling datarows from two different tables in the...
9
1549
by: Kevin Hodgson | last post by:
I'm experiencing a strange Dataset Update problem with my application. I have a dataset which has a table holding a set of customer information records. (address, contact, info, etc.) I have a series of ComboBoxes (Client Number for selection), and text fields to show the other data bound to this Dataset.table If I change a value for the first client in the list, and press my update client button, the data is successfully updated to the...
669
26218
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic paper written on this subject. On the Expressive Power of Programming Languages, by Matthias Felleisen, 1990. http://www.ccs.neu.edu/home/cobbe/pl-seminar-jr/notes/2003-sep-26/expressive-slides.pdf
3
2149
by: Siong.Ong | last post by:
Dear all, my PHP aims to update a MySQL database by selecting record one by one and modify then save. Here are my PHP, but I found that it doesnt work as it supposed to be, for example, when Record (i) is shown and modified, the change will come to Record (i+1). Can anyone provide suggestion? thanks.
6
2015
by: CTG | last post by:
"update set UPDATE-FLAG=false, UPDATE-DT= '10/09/2007 4:09:59 PM' WHERE ICCID='I1' " UPDATE_FLAG is a YES/NO ICCID is TEXT I have tried YES, NO as well but still fails,
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9931
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6727
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.