Article View: comp.databases.ms-sqlserver
Article #78Re: How to convert from CHAR to Numeric in the table
From: Simon Hayes
Date: Thu, 29 Sep 2005 14:34
Date: Thu, 29 Sep 2005 14:34
10 lines
1753 bytes
1753 bytes
If the only problem is the column data type, and you know the data itself is already numeric, then you can just alter the column data type directly: alter table SomeTable alter column invamt numeric(10,5) See "CAST and CONVERT" in Books Online for general information about data type conversion. Simon
Technical Details
Message-ID:
<1128004480.969391.103510@g14g2000cwa.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mailReferences:
<TSS_e.10727$WT3.7999@trnddc03>Show Full Headers
Complete Article Headers
X-Google-Thread: 104de1,7a42fe3b69ba55f5 X-Google-Thread: ff490,7a42fe3b69ba55f5 X-Google-Thread: 10f695,7a42fe3b69ba55f5 X-Google-Attributes: gid104de1,gidff490,gid10f695,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail From: "Simon Hayes" <sql@hayes.ch> Newsgroups: comp.databases.ms-sqlserver,cz.comp.microsoft.sql,microsoft.public.sqlserver.server Subject: Re: How to convert from CHAR to Numeric in the table Date: 29 Sep 2005 07:34:41 -0700 Organization: http://groups.google.com Lines: 11 Message-ID: <1128004480.969391.103510@g14g2000cwa.googlegroups.com> References: <TSS_e.10727$WT3.7999@trnddc03> NNTP-Posting-Host: 213.173.163.2 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1128004486 25589 127.0.0.1 (29 Sep 2005 14:34:46 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 29 Sep 2005 14:34:46 +0000 (UTC) In-Reply-To: <TSS_e.10727$WT3.7999@trnddc03> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.10) Gecko/20050717 Firefox/1.0.6,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 zrhprx23 (NetCache NetApp/6.0),1.1 webwasher (Webwasher 5.2.0.1858) Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=213.173.163.2; posting-account=jtHl8QwAAAA4U5WBPvY180Zt4-VdFla2