Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stored Procedure Debugging

Status
Not open for further replies.

karthickkandasamy

Programmer
May 1, 2005
1
0
0
IN
Syntax error converting the varchar value 'SELECT coid FROM Nov_BusinessProfile BProfile WHERE (BProfile.BP_BusinessNature LIKE '%1,[ ]%') OR ( BProfile.BP_BusinessNature LIKE ',%[ ]1%') OR ( BProfile.BP_BusinessNature LIKE '%,[ ]1%') OR ( BProfile.BP_BusinessNature LIKE '%,[ ],1%') OR ( BProfile.BP_BusinessNature LIKE '1') OR ( BProfile.BP_BusinessNature LIKE '[ ]%,1,[ ]%')' to a column of data type

This is a subquery, i'm using in a stored procedure & it is used for searching purpose.

 
Are you using the convert command in SQL:
Code:
CONVERT (VARCHAR(250), A.TEXT) AS TEXT

If this isn't what your looking for, please be a little more specific in your question.

Brad [spidey]
 
This is more a question to the SQL server Programing group.
But if you could show us the full statement that is causing the error it would help to understand what's going on.

AL Almeida
NT/DB Admin
"May all those that come behind us, find us faithfull"
 
Also, have you tested the query in QA? I would test the code as a stand alone query, then test the stored procedure. That is what I have been doing because RS isn't very clear on where errors are on queries entered or stored procedures executed.

Verify it in QA both ways, and if you're still having problems in RS, but it works fine in QA, then it's something RS is choking on.

The error message itself seems to think that you're trying to convert a Varchar to a datatype of DataType in SQL. I usually get a "invalid column name" message similar to that when I forget punctuation like a comma. Doublecheck that too.

Hope this helps.

Catadmin

Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top