Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Help Needed !!!

Author  Topic 

direrayne
Starting Member

30 Posts

Posted - 2010-09-13 : 10:48:03
when i run the update script below i gett his error i cannot fix it.
the first time i ran it it ran fine, then it never ran again. just this error.

Code:

update RM00301 set SPRSNSLN = left('Batista, Yuliana Mer',20), ADDRESS1= 'Jewellery Salespeople', ADDRESS2= '8/10/10', CITY = '174', [STATE] = '20', ZIP = '17828.9', COUNTRY = 'COMM' where SLPRSNID = 817


Error:

Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the varchar value 'Split ' to data type int.

everything seems right however.

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-09-13 : 10:57:53
Is there a trigger on the table/

--
Gail Shaw
SQL Server MVP
Go to Top of Page

direrayne
Starting Member

30 Posts

Posted - 2010-09-13 : 11:02:06
quote:
Originally posted by GilaMonster

Is there a trigger on the table/

--
Gail Shaw
SQL Server MVP



Yes, there is a trigger on the Table, tigger code is as follows:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER TRIGGER [dbo].[zDT_RM00301U] ON [dbo].[RM00301] AFTER UPDATE AS set nocount on BEGIN UPDATE dbo.RM00301 SET DEX_ROW_TS = GETUTCDATE() FROM dbo.RM00301, inserted WHERE RM00301.SLPRSNID = inserted.SLPRSNID END set nocount off
Go to Top of Page

direrayne
Starting Member

30 Posts

Posted - 2010-09-13 : 14:43:10
Fixed

Datatype and implicit conversion.

It looks like my ID column is not an Integer and is a string of some type.
Go to Top of Page
   

- Advertisement -