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
 Transact-SQL (2000)
 numeric to a smallint..

Author  Topic 

DBASlut
Yak Posting Veteran

71 Posts

Posted - 2005-06-10 : 19:12:16
can this be done
DECLARE @X smallint, @cb varchar(25)


set @cb='00.000'
set @X = @cb

select @x

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-06-10 : 19:25:36
This should do it:
DECLARE @X smallint, @cb varchar(25)

set @cb='00.000'
set @X = convert(numeric(10,2),@cb)

select @x




CODO ERGO SUM
Go to Top of Page

DBASlut
Yak Posting Veteran

71 Posts

Posted - 2005-06-10 : 20:55:36
thank you so much sir..
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-06-10 : 22:10:20
Nice name btw.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -