Page 1 of 1

Convert from string to int.

Posted: Sat May 31, 2014 7:46 pm
by theregister
Hi, is there a way to convert a string data to int.

I have some data in 2 tables, they contain the same data, the only diference is that in one table its an int and in the other its a varchar, i want to make a relation and the relation needs to be done with this columns, can i convert the string to int?, i ask for the string to int because for some other cases i need to compare if its > or <.

I cant modify the database, its not mine, and also cant use sql code, it have to be done with only the functions that exist in your system.

Re: Convert from string to int.

Posted: Mon Jun 02, 2014 11:36 am
by Alex K.
Hello,

Please try to use the following code:

Code: Select all

int.Parse()
Thank you.