Solved

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

Posted on 2010-08-24
2
612 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 60

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

726 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