Click here to Skip to main content
15,918,574 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
(CASE WHEN f_Test.ClientId='0' THEN 'Walkin' ELSE  c_Client.ClientID  END)
        as  ClientID,


Error Occur in

Conversion failed when converting the varchar value 'Walkin' to data type int.


How to Solve its
Please Help Me,
Posted

Error is pretty clear,'Walkin' can not be converted to integer. Don't even try for it. It can't be.

Please see this : http://msdn.microsoft.com/en-us/library/5kzh1b5w(v=vs.90).aspx[^]

Regards..
 
Share this answer
 
Please check ur database parameter values data type or else apply this function.
cast(int,varchar) but throws exception if the vallue is other than int type or alphanumeric....
 
Share this answer
 
Comments
Thanks7872 31-Oct-13 1:56am    
That is what the question is.
You wrote: throws exception if the vallue is other than int type or alphanumeric. OP faced this. You are supposed to provide solution to this.
santosh1520 31-Oct-13 2:06am    
if u are providing alphanumeric it will convert to ascii byte value if u needed...

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