Solved

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

Posted on 2010-08-24
2
606 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

803 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