Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-08-24
2
Medium Priority
?
614 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 1000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

721 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