Home > Archive > microsoft.public.sqlserver.server > November 2002 > CONVERT





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author CONVERT
WT

2002-11-21, 1:23 am

Hi

DECLARE @CC VARCHAR(20)
SELECT @CC='9.2128536E-4'
SELECT CAST(@CC AS NUMERIC)

This command return an error "Error converting data type varchar to
numeric."

How can I convert values with Exp to numeric

Thanks in advance

Wilson


BlueGI

2002-11-21, 8:23 am

You can enter scientific notation as a number

DECLARE @CC float -- or whatever
SELECT @CC = 9.2128536E-4


"WT" <wilsontc@singnet.com.sg> wrote in message
news:#QPdkfSkCHA.1652@tkmsftngp11...
> Hi
>
> DECLARE @CC VARCHAR(20)
> SELECT @CC='9.2128536E-4'
> SELECT CAST(@CC AS NUMERIC)
>
> This command return an error "Error converting data type varchar to
> numeric."
>
> How can I convert values with Exp to numeric
>
> Thanks in advance
>
> Wilson
>
>



Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net