You are here: Re: Datatype-convertion in TSQL « MsSQL Server « IT news, forums, messages
Re: Datatype-convertion in TSQL

Posted by Erland Sommarskog on 06/21/06 13:33

Filips Benoit (benoit.filips@pandora.be) writes:
> Float-convertions is OK
>
> Can't find a code for datetime-conversion from nvarchar format DD/MM/YYYY
> http://doc.ddart.net/mssql/sql70/ca-co_1.htm

It's there on that page. You need to read the table headers a little more
closely.

> What is the max lenght of sql_variant?

8000 bytes.

> Now CPRP_VALUE = nvarchar 1024 Is it possible to change the
> field-datatype having existing data?

One way or another it is. I would guess that ALTER TABLE ALTER COLUMN works,
but I have not actually tried it. But obviously if you do that, all
data will be converted with a basetype of nvarchar, so you would have to
write some script to repopulate the column.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация