By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,806 Members | 1,841 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,806 IT Pros & Developers. It's quick & easy.

SQL Function

P: n/a
hello everyone,

I created a function in MSSQL that builds an html coupon based upon the
coupon ident (more complex than that, but that's not where i'm having
problems!)

When the function builds the coupon, it returns the stream as
VarChar(8000)

I am calling this function in a sproc that passes in the coupon ident.
But when I execute this sproc, I get the following error:

Syntax error converting the varchar value '<html>......"

What am I doing wrong? Are there problems with the datatypes I"m
using?

Thanks in advance for any help on this?

Apr 27 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Are you calling the function as in : SELECT * dbo.myFunction or some other
way?
Could you post the function and the call from the sproc
----
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"Sean" <sk*****@genex.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
hello everyone,

I created a function in MSSQL that builds an html coupon based upon the
coupon ident (more complex than that, but that's not where i'm having
problems!)

When the function builds the coupon, it returns the stream as
VarChar(8000)

I am calling this function in a sproc that passes in the coupon ident.
But when I execute this sproc, I get the following error:

Syntax error converting the varchar value '<html>......"

What am I doing wrong? Are there problems with the datatypes I"m
using?

Thanks in advance for any help on this?

Apr 28 '06 #2

P: n/a
Sean (sk*****@genex.com) writes:
I created a function in MSSQL that builds an html coupon based upon the
coupon ident (more complex than that, but that's not where i'm having
problems!)

When the function builds the coupon, it returns the stream as
VarChar(8000)

I am calling this function in a sproc that passes in the coupon ident.
But when I execute this sproc, I get the following error:

Syntax error converting the varchar value '<html>......"

What am I doing wrong? Are there problems with the datatypes I"m
using?


Your major error in your post is that you don't include the code that
you use. I'm sorry, but it is not possible to help you from the description
you have given. You have apparently messed up the data types somewhere,
but that's all I can say.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Apr 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.