﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / T-SQL (SS2K5)  / convert bigint to int / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 01:23:21 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: convert bigint to int</title><link>http://www.sqlservercentral.com/Forums/Topic627845-338-1.aspx</link><description>if your bigint value exceeds the maximum value for int then its not possible to convert.</description><pubDate>Wed, 31 Dec 2008 03:25:28 GMT</pubDate><dc:creator>ChiragNS</dc:creator></item><item><title>RE: convert bigint to int</title><link>http://www.sqlservercentral.com/Forums/Topic627845-338-1.aspx</link><description>Thanks yaar ......I tried it like that but it throws an error when int range limit is exceeded</description><pubDate>Wed, 31 Dec 2008 02:42:52 GMT</pubDate><dc:creator>sar_kan25</dc:creator></item><item><title>RE: convert bigint to int</title><link>http://www.sqlservercentral.com/Forums/Topic627845-338-1.aspx</link><description>Interesting here... I think that you cannot convert from bigint to int if the range is exceeded otherwise from int to bigint I try and it works!There is the ranges for the numeric datatypes:[code]bigint     -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)int         -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)	smallint  -2^15 (-32,768) to 2^15-1 (32,767)tinyint    (0 to 255)	[/code]:w00t:</description><pubDate>Wed, 31 Dec 2008 02:42:39 GMT</pubDate><dc:creator>Dugi</dc:creator></item><item><title>RE: convert bigint to int</title><link>http://www.sqlservercentral.com/Forums/Topic627845-338-1.aspx</link><description>Dear I think there no such way to convert value from bigint to int the only way to change the datatype of int variable to bigint@Deep bigintIf there is any then please post it.Regards,Yousaf Khan</description><pubDate>Wed, 31 Dec 2008 01:41:57 GMT</pubDate><dc:creator>Yousaf Khan</dc:creator></item><item><title>RE: convert bigint to int</title><link>http://www.sqlservercentral.com/Forums/Topic627845-338-1.aspx</link><description>The bigint data type is supported where integer values are supported. However, when we are passing the bigint value to integer values, if the value exceeds the integer range it can't assing the bigint value to int.declare @sar bigintdeclare @deep intbegin	set @sar=3000000	set @deep =@sar             select @deependhere it will not throw any error, since the int range is not exceeded.declare @sar bigintdeclare @deep intbegin	set @sar=3000000000'here it will throw the error.	set @deep =convert(int,@sar/1000)	select @deependNandy</description><pubDate>Wed, 31 Dec 2008 00:45:06 GMT</pubDate><dc:creator>Nandy</dc:creator></item><item><title>RE: convert bigint to int</title><link>http://www.sqlservercentral.com/Forums/Topic627845-338-1.aspx</link><description>Your Question is not clearI think you want to do thisdeclare @sar  bigint declare @deep intset @sar = 1234356set @deep = 12select convert(int,@sar)select @deep Regards,Yousaf Khan</description><pubDate>Wed, 31 Dec 2008 00:42:08 GMT</pubDate><dc:creator>Yousaf Khan</dc:creator></item><item><title>convert bigint to int</title><link>http://www.sqlservercentral.com/Forums/Topic627845-338-1.aspx</link><description>I have two variables @sar delared as bigint and @deep declared as intI want to convert bigint to int. That is value of @sar to int.Is this possible ? If yes How?:hehe:</description><pubDate>Wed, 31 Dec 2008 00:05:17 GMT</pubDate><dc:creator>sar_kan25</dc:creator></item></channel></rss>