Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Simple Cast


Message #1 by rg1@h... on Wed, 3 Oct 2001 20:19:33
Wonderful! Thanks.

-----Original Message-----
From: Harry Jega Nathan [mailto:hjeganathan@y...]
Sent: Wednesday, October 03, 2001 1:03 PM
To: sql language
Subject: [sql_language] Re: Simple Cast


 change the code to (CAST(column1, AS Decimal) / 100)

  rg1@h... wrote: Hi.

I have column1 defined as smallint. I want to divide column1 by 100 and 
store it in column2 defined as decimal, precision 5, scale 4.

Could somebody please give me the code. I tried the following but got .0000
in column2 when column1 had 85:
CAST((column1 / 100), AS Decimal)

TIA.

Rita


  Return to Index