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 2000 Forums
 SQL Server Development (2000)
 grrr...String or binary data would be truncated.

Author  Topic 

genic
Yak Posting Veteran

57 Posts

Posted - 2001-10-18 : 13:02:45
exec sp_newCustomer @custnum='165734', @altnum='',
@custtype='', @lastname='', @firstname='',
@addr1='', @city='', @state='', @zipcode='', @phone1='',
@expired='1', @badcheck='1', @exempt='1', @nomail='1'


that returns the error. all of the data type values are exactly the same as they are in the table, etc....its pissing me off, i am even trying to convert on insert, and its still not working, any insight?
thanks


the sp (forgive the line breaks in the insert..none exsist

CREATE procedure sp_newCustomer
@custnum as varchar(10),
@altnum as varchar(15),
@custtype as char,
@lastname as varchar(20),
@firstname as varchar(15),
@addr1 as varchar(40),
@city as varchar(20),
@state as char,
@zipcode as char,
@phone1 as varchar(14),
@expired as bit,
@badcheck as bit,
@exempt as bit,
@nomail as bit

as

-- new customer information

insert into customer (custnum, altnum, custtype, lastname, firstname, addr1, city, state, zipcode, phone1, expired, badcheck, exempt, nomail)
values (convert(int, @custnum), '@altnum', '@custtype', '@lastname', '@firstname', '@addr1', '@city', '@state', '@zipcode', '@phone1', convert(bit, @expired), convert(bit, @badcheck), convert(bit, @exempt), convert(bit, @nomail))
GO
   

- Advertisement -