Advertisement

03.06.2008 at 03:45AM PST, ID: 23219191
[x]
Attachment Details

Conversion failed when converting the varchar value 'TEN' to data type int.

Asked by Trudye in MS SQL Server

Tags: Microsoft, SQL Server, 2005, T-SQL

I am recieving the following error when executing the following code. Field MonData is nvarchar (80), the only integer feild in the concatination is @Cnt all other fields are varchar or nvarchar. If I remove the everything past space(22) it works fine. I double checked the length and it does not exceed 80 bytes.
Can anyone see what I am doing wrong?

INSERT INTO tbl_Export            
Select DISTINCT TOP(1) space(32) + '9' + space(2) + @Cnt + space(2) + Sys + space(2) +
      Prin + space(22) + 'TEN' + space(1) + 'ZZ' As MonData
FROM dbo.tblTrans
WHERE Sys = @vwSys AND Prin = @vwPrin      

Conversion failed when converting the varchar value 'TEN' to data type int.
Start Free Trial
 
 
[+][-]03.06.2008 at 04:20AM PST, ID: 21059400

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 06:01AM PST, ID: 21060179

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 06:14AM PST, ID: 21060292

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 06:25AM PST, ID: 21060390

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 06:58AM PST, ID: 21060714

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 07:01AM PST, ID: 21060740

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.06.2008 at 08:36AM PST, ID: 21061997

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 09:35AM PST, ID: 21062732

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 10:40PM PST, ID: 21067841

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 10:44PM PST, ID: 21067858

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 10:47PM PST, ID: 21067868

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: Microsoft, SQL Server, 2005, T-SQL
Sign Up Now!
Solution Provided By: auke_t
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.07.2008 at 03:26AM PST, ID: 21069035

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628