I'm having problems using an update query. I get the error: Server: Msg
8152, Level 16, State 9, Procedure SP_MemberUpdate , Line 3
String or binary data would be truncated.
The statement has been terminated.
I have 2 databases that I DTS data out of and create a view for each.
I'm trying to update from each view, but when I try the first update, I
get the error. I have an insert-Into, select query that works fine this
way. Help apprecaitd. Here is the query:
CREATE PROCEDURE [DBO].[SP_MemberUpdate] AS
UPDATE tMembers SET tMembers.Custom erNumber =
tMembers_View.C ustomerNumber,
tMembers.Custom erName = tMembers_View.C ustomerName,
tMembers.Addres sLine1 = tMembers_View.A ddressLine1,
tMembers.Addres sLine2 = tMembers_View.A ddressLine2,
tMembers.Addres sLine3 = tMembers_View.A ddressLine3,
tMembers.City = tMembers_View.C ity,
tMembers.State = tMembers_View.S tate,
tMembers.ZipCod e = tMembers_View.Z ipCode,
tMembers.Countr yCode = tMembers_View.C ountryCode,
tMembers.PhoneN umber = tMembers_View.P honeNumber,
tMembers.FaxNum ber = tMembers_View.F axNumber,
tMembers.EmailA ddress = tMembers_View.E mailAddress,
tMembers.URLAdd ress = tMembers_View.U RLAddress,
tMembers.SalesP ersonCode = tMembers_View.S alesPersonCode,
tMembers.Active = tMembers_View.A ctive,
tMembers.Siccod e = tMembers_View.S iccode,
tMembers.sic_De scription = tMembers_View.s ic_Description,
tMembers.Stat = tMembers_View.S tat
FROM tMembers_View
WHERE tMembers.Custom erNumber = tMembers_View.C ustomerNumber And
tMembers.Custom erName = tMembers_View.C ustomerName
GO
Steve
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! 2 3043
"Steve Bishop" <st****@viper.c om> wrote in message
news:40******** *************** @news.frii.net. .. I'm having problems using an update query. I get the error: Server: Msg 8152, Level 16, State 9, Procedure SP_MemberUpdate , Line 3 String or binary data would be truncated. The statement has been terminated.
I have 2 databases that I DTS data out of and create a view for each. I'm trying to update from each view, but when I try the first update, I get the error. I have an insert-Into, select query that works fine this way. Help apprecaitd. Here is the query: CREATE PROCEDURE [DBO].[SP_MemberUpdate] AS
UPDATE tMembers SET tMembers.Custom erNumber = tMembers_View.C ustomerNumber, tMembers.Custom erName = tMembers_View.C ustomerName, tMembers.Addres sLine1 = tMembers_View.A ddressLine1, tMembers.Addres sLine2 = tMembers_View.A ddressLine2, tMembers.Addres sLine3 = tMembers_View.A ddressLine3, tMembers.City = tMembers_View.C ity, tMembers.State = tMembers_View.S tate, tMembers.ZipCod e = tMembers_View.Z ipCode, tMembers.Countr yCode = tMembers_View.C ountryCode, tMembers.PhoneN umber = tMembers_View.P honeNumber, tMembers.FaxNum ber = tMembers_View.F axNumber, tMembers.EmailA ddress = tMembers_View.E mailAddress, tMembers.URLAdd ress = tMembers_View.U RLAddress, tMembers.SalesP ersonCode = tMembers_View.S alesPersonCode, tMembers.Active = tMembers_View.A ctive, tMembers.Siccod e = tMembers_View.S iccode, tMembers.sic_De scription = tMembers_View.s ic_Description, tMembers.Stat = tMembers_View.S tat
FROM tMembers_View WHERE tMembers.Custom erNumber = tMembers_View.C ustomerNumber And tMembers.Custom erName = tMembers_View.C ustomerName GO
Steve
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
Without CREATE TABLE statements to see the data types, and sample data which
gives this error, it's not possible to say where the data is being
truncated. But you should look for a column in the source view which is
longer than the corresponding column in the target table, eg. a varchar(100)
going to a varchar(75). In that example, if the value coming from the view
has 80 characters, you will see this error.
Simon
check if varchar datatypes are the same (length) in tMembers and
tMembers_views
"Steve Bishop" <st****@viper.c om> wrote in message
news:40******** *************** @news.frii.net. .. I'm having problems using an update query. I get the error: Server: Msg 8152, Level 16, State 9, Procedure SP_MemberUpdate , Line 3 String or binary data would be truncated. The statement has been terminated.
I have 2 databases that I DTS data out of and create a view for each. I'm trying to update from each view, but when I try the first update, I get the error. I have an insert-Into, select query that works fine this way. Help apprecaitd. Here is the query: CREATE PROCEDURE [DBO].[SP_MemberUpdate] AS
UPDATE tMembers SET tMembers.Custom erNumber = tMembers_View.C ustomerNumber, tMembers.Custom erName = tMembers_View.C ustomerName, tMembers.Addres sLine1 = tMembers_View.A ddressLine1, tMembers.Addres sLine2 = tMembers_View.A ddressLine2, tMembers.Addres sLine3 = tMembers_View.A ddressLine3, tMembers.City = tMembers_View.C ity, tMembers.State = tMembers_View.S tate, tMembers.ZipCod e = tMembers_View.Z ipCode, tMembers.Countr yCode = tMembers_View.C ountryCode, tMembers.PhoneN umber = tMembers_View.P honeNumber, tMembers.FaxNum ber = tMembers_View.F axNumber, tMembers.EmailA ddress = tMembers_View.E mailAddress, tMembers.URLAdd ress = tMembers_View.U RLAddress, tMembers.SalesP ersonCode = tMembers_View.S alesPersonCode, tMembers.Active = tMembers_View.A ctive, tMembers.Siccod e = tMembers_View.S iccode, tMembers.sic_De scription = tMembers_View.s ic_Description, tMembers.Stat = tMembers_View.S tat
FROM tMembers_View WHERE tMembers.Custom erNumber = tMembers_View.C ustomerNumber And tMembers.Custom erName = tMembers_View.C ustomerName GO
Steve
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David Shorthouse |
last post by:
Hello folks,
I have a problem with an update query on an asp not updating the table
in an Access db. The code runs, I have no errors, but when I examine the
table, nothing was updated. The query works as it should in Access. Could
anyone direct me to some sources that describe solutions to what is likely a
common problem? The strange thing is, I have another update query for a
different db on an asp that works just great. Is there...
|
by: kalamos |
last post by:
This statement fails
update ded_temp a
set a.balance = (select sum(b.ln_amt)
from ded_temp b
where a.cust_no = b.cust_no
and a.ded_type_cd = b.ded_type_cd
and a.chk_no = b.chk_no
group by cust_no, ded_type_cd, chk_no)
|
by: rrh |
last post by:
I am trying to update a field in one table with data from another
table. The problem I'm running into is I need to base the update on a
range of data in the 2nd table.
Table 1 has:
date field
new field
table 2 has:
key field (autonumber)
|
by: Randy Harris |
last post by:
I imported records into a table, later found out that many of them had
trailing spaces in one of the fields. If I'd caught it sooner, I could have
trimmed the spaces before the import.
This wouldn't work (nothing changed):
UPDATE tblManuals SET tblManuals.PARTNUM = Trim();
Would someone please tell me how to do an update query that will trim the
spaces?
|
by: James Butler |
last post by:
Our setup:
Online db: MySQL
Inhouse db: MS Access 97 with MySQL tables linked via ODBC
Our issue:
Almost every field updates successfully, except one.
A scenario:
Information is written to online db.
We run an inhouse query to collect info from online db and update
| |
by: Maxi |
last post by:
There is a lotto system which picks 21 numbers every day out of 80
numbers.
I have a table (name:Lotto) with 22 fields (name:Date,P1,P2....P21)
Here is the structure and sample data:
"Date","P1","P2","P3","P4","P5","P6","P7","P8","P9","P10","P11","P12","P13","P14","P15","P16","P17","P18","P19","P20","P21"
1/1/2005,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21
1/2/2005,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
|
by: joeyrhyulz |
last post by:
Hi,
I'm trying to make a very simple update statement (in Oracle) in jet
sql that seems much more difficult than it should be.
The root of my problem is that I'm trying to update a field on a table
using dmax, which references another query to update the table.
Although I have all of the correct keys from the physical table joined
to the query in the dmax function, the code/ms access seems to ignore
the joins. As a result, all payees...
|
by: ARC |
last post by:
Hello all,
So I'm knee deep in this import utility program, and am coming up with all
sorts of "gotcha's!".
1st off. On a "Find Duplicates Query", does anyone have a good solution for
renaming the duplicate records? My thinking was to take the results of the
duplicate query, and somehow have it number each line where there is a
duplicate (tried a groups query, but "count" won't work), then do an update
query to change the duplicate to...
|
by: RAG2007 |
last post by:
I'm using the QueryDef and Execute method to update a record in my MySQL backend.
Problem: When the Passthrough update query is defined using QueryDef, it becomes a select query, and I cannot use the Execute Method.
Instance:
The following code is defined as a query called "AddCost"
UPDATE tblinitiative SET tblinitiative.Estimate = " & Estimate & ", tblinitiative.FinalCost = " & FinalCost & " WHERE (((tblinitiative.InitID)=" & InitID &...
|
by: giovannino |
last post by:
Dear all,
I did a query which update a sequence number (column NR_SEQUENZA) in a table using a nice code (from Trevor !).
1) Given that I'm not a programmer I can't understand why numbering doesn't start always, running more times the update query, from the same starting parameter assigned (1000000000).
It seems to me that it takes memory last number calculated and running prox update it starts from last table row updated. I need...
|
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,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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...
|
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 project—planning, coding, testing, and deployment—without 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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |