cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error Converting data type nvarchar to numeric

former_member781837
Participant
0 Likes
1,597

Hi experts,

I'm sitting with an issue with a formatted search currently.

The FMS looks like this:

SELECT $[$38.14.NUMBER] FOR BROWSE

This works for anything under 999 but as soon as it goes over 1,000 i get the error as it says in the title.

It seems that the , in the number is screwing us around. How can i get past this without changing the display options?

Thanks

Reinhardt

Accepted Solutions (1)

Accepted Solutions (1)

former_member781837
Participant
0 Likes

Gordon,

You're right, i just noticed that the field is a rate field. Would this be possible to convert then to numeric?

Former Member
0 Likes

Change the type may not be possible if there value exists in the UDF. You need recreate a new UDF.

Answers (5)

Answers (5)

former_member781837
Participant
0 Likes

Thx Rahul, but it didn't work.

Awarding Gordon the points as i just did that and it works now.

Thanks Gordon

Former Member
0 Likes

Hi........

Just try this.......

Declare @Rate as int
Set @Rate=$[$38.14.Number]
Begin
Select @Rate
End

Hope this will help you......

Regards,

Rahul

former_member781837
Participant
0 Likes

We are trying to avoid the "changing of the thousand seperator". I need to do this through SQL

Former Member
0 Likes

I have checked in our database, there is no problem for the FMS. You need to check all your settings to find out why you got error.

I am afraid you are trying to put this value into a UDF that is not numeric.

former_member781837
Participant
0 Likes

Still the same error without the browse.

I think i need to convert the number somehow. For example:

If the price is 1,500 i need to convert it to 1500 (without the comma).

because if i take off the thousand seperator under administration - system initialisation - General - display, it works well.

vasileiosfasolis
Active Contributor
0 Likes

Hi

try to use define it as you said from administration by replacing the comma

Edited by: Fasolis Vasilios on Nov 23, 2011 2:55 PM

Former Member
0 Likes

Hi Reinhardt,

You do not need for browse here.

Try: SELECT $[$38.14.number\]

Thanks,

Gordon