Solved

sql server types T-SQL and CLR parameter "@ note" do not match

Posted on 2010-08-24
2
603 Views
Last Modified: 2012-05-10
OK MY FRIEND,
that problem is already solved. Thanks
Now I have this otherError in CREATE FUNCTION for "ConvertirNumerosALetra" because the types T-SQL and CLR parameter "@ note" do not match.

create function ConvertirNumerosALetra (@nota decimal(2,2)) returns nvarchar(500)
external name [Amag.ConvertNumberToText].[ConvertNumberToText.Utilities].GetStringFromNumber;
0
Comment
Question by:enrique_aeo
2 Comments
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 250 total points
ID: 33513050
Okay, from the other question you have:

GetStringFromNumber(double value)

That is not the same data type as decimal(2, 2) as the error is saying. You could look at float or real (http://msdn.microsoft.com/en-us/library/ms173773.aspx), but if you need the more precise decimal you can just alter the function's signature.

Note: decimal(2, 2) will allow values .00 to .99. It means 2 digit decimal with both digits being after the period. Hopefully that is what you want.

Okay to fix the issue in the function, you can use the SqlDecimal type.
http://msdn.microsoft.com/en-us/library/ms131092.aspx

Note also it shows that you can use SqlDouble in your function and then that will equate to float in SQL Server.
0
 

Author Closing Comment

by:enrique_aeo
ID: 33521974
the data type is float
create function ConvertirNumerosALetra (@nota float) returns nvarchar(500)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now