Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Conversion failed when converting the nvarchar value to data type int.

I have this sql error how to convert from type to another ???? in query statement
Posted
Updated 25-Dec-11 21:21pm
v2
Comments
ManavGuru 26-Dec-11 3:24am    
Please Can You write code where is error genrate
AmitGajjar 26-Dec-11 3:35am    
show us your query.

go through the below link

Here[^]
and
Here[^]
 
Share this answer
 
you can use CAST Data type for Convert nvarchar to int or to other DataType.
 
Share this answer
 
used cast or convert that will used for u jusk check it.

Syntax for CAST:
CAST ( expression AS data_type [ ( length ) ] )


Syntax for CONVERT:
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )


hope this will help u
thank u!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900