Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL Server Function for CLng

Author  Topic 

ramdas
Posting Yak Master

181 Posts

Posted - 2003-03-06 : 13:50:06
Hi Folks,
I have access queries which use CLng function to convert values to Long, what would be an appropriate function for it in SQL Server would it be ROUND or CEILING.

Bye

Ramdas Narayanan
SQL Server DBA

Onamuji
Aged Yak Warrior

504 Posts

Posted - 2003-03-06 : 14:00:12
depends ... was VBA access' Long data type 32-bit or 64-bit ...

CAST(Value AS INT) -- 32-bit
CAST(Value AS BIGINT) -- 64-bit SQL 2k only

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-03-06 : 14:02:15
Or:

Select Convert(Int,1.2)


Brett

8-)

PS Also why not define your column as Int to begin with.

Go to Top of Page

simondeutsch
Aged Yak Warrior

547 Posts

Posted - 2003-03-06 : 14:20:00
VB has no 64 bit integer, unless there's one in VB.Net. The largest integer is Long, corresponding to SQL's INT.

Sarah Berger MCSD
Go to Top of Page
   

- Advertisement -