Convert char to smallint
Posted in 1998
This is a multi-part message in MIME format.
------=_NextPart_000_00B6_01BE01CC.1AE89980
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I have two fields in two different tables on which I want to make a join =
in my select statement. The problem is that one of two is a char(8) and =
the other one is a smallint.=20
Example :
field1 : smallint
field2 : char(8)
select * from Table1,Table2 where field1 =3D field2 ...
How can I make the conversion.
I can't modify the data type in my database.
Thanks.
------=_NextPart_000_00B6_01BE01CC.1AE89980
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Hello,</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>I have two fields in two different =
tables on=20
which I want to make a join in my select statement. The problem is that =
one of=20
two is a char(8) and the other one is a smallint. </FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>Example :</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>field1 : smallint</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>field2 : char(8)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>select * from Table1,Table2 where =
field1 =3D=20
field2 ...</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>How can I make the =
conversion.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>I can't modify the data type in my=20
database.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>Thanks.</FONT></DIV></BODY></HTML>
------=_NextPart_000_00B6_01BE01CC.1AE89980--