Showing posts with label dts. Show all posts
Showing posts with label dts. Show all posts

Sunday, March 11, 2012

Change collation for an existing database

Hi !
I would like to know how to change the collation of an imported database. I
tried something with DTS, but I'm quiet a beginner with this tool. So if
anyone could help me on this one, this would be great ! ;-)
Thanks in advance !
I just forgot to say that I use SQL 2000 SP4.
"Vincent D." wrote:

> Hi !
> I would like to know how to change the collation of an imported database. I
> tried something with DTS, but I'm quiet a beginner with this tool. So if
> anyone could help me on this one, this would be great ! ;-)
> Thanks in advance !
|||Seems that similar issue has been handled recently. Pls have a look at the 2
posts of 28/11/05.
http://www.microsoft.com/technet/com...8-B1DE-B6EB49F
31B7E&dglist=&ptlist=&exp=&sloc=en-us
"Vincent D." wrote:
[vbcol=seagreen]
> I just forgot to say that I use SQL 2000 SP4.
> "Vincent D." wrote:

Change collation for an existing database

Hi !
I would like to know how to change the collation of an imported database. I
tried something with DTS, but I'm quiet a beginner with this tool. So if
anyone could help me on this one, this would be great ! ;-)
Thanks in advance !I just forgot to say that I use SQL 2000 SP4. :)
"Vincent D." wrote:
> Hi !
> I would like to know how to change the collation of an imported database. I
> tried something with DTS, but I'm quiet a beginner with this tool. So if
> anyone could help me on this one, this would be great ! ;-)
> Thanks in advance !|||Seems that similar issue has been handled recently. Pls have a look at the 2
posts of 28/11/05.
http://www.microsoft.com/technet/community/newsgroups/dgbrowser/en-us/default.mspx?query=collation&dg=microsoft.public.sqlserver.server&cat=en-us-technet-sqlserv&lang=en&cr=US&pt=261BA873-F3AB-420E-96D6-E3004596A551&catlist=328BAFD2-1A81-4558-B1DE-B6EB49F31B7E&dglist=&ptlist=&exp=&sloc=en-us
"Vincent D." wrote:
> I just forgot to say that I use SQL 2000 SP4. :)
> "Vincent D." wrote:
> > Hi !
> >
> > I would like to know how to change the collation of an imported database. I
> > tried something with DTS, but I'm quiet a beginner with this tool. So if
> > anyone could help me on this one, this would be great ! ;-)
> >
> > Thanks in advance !

Change collation for an existing database

Hi !
I would like to know how to change the collation of an imported database. I
tried something with DTS, but I'm quiet a beginner with this tool. So if
anyone could help me on this one, this would be great ! ;-)
Thanks in advance !I just forgot to say that I use SQL 2000 SP4.
"Vincent D." wrote:

> Hi !
> I would like to know how to change the collation of an imported database.
I
> tried something with DTS, but I'm quiet a beginner with this tool. So if
> anyone could help me on this one, this would be great ! ;-)
> Thanks in advance !|||Seems that similar issue has been handled recently. Pls have a look at the 2
posts of 28/11/05.
http://www.microsoft.com/technet/co...r />
E-B6EB49F
31B7E&dglist=&ptlist=&exp=&sloc=en-us
"Vincent D." wrote:
[vbcol=seagreen]
> I just forgot to say that I use SQL 2000 SP4.
> "Vincent D." wrote:
>

Saturday, February 25, 2012

Century date conversions

Hi,
I'm trying to load date fields into SQLServer using DTS, but the
format of the raw data is the number of days since 1 Jan 1900. How do
I convert this to a useful format, is there a standard conversion
routine?

Thanks
Timtim.philbrook@.cazenove.com (Helsop) wrote in message news:<1609a822.0408180233.9fbed33@.posting.google.com>...
> Hi,
> I'm trying to load date fields into SQLServer using DTS, but the
> format of the raw data is the number of days since 1 Jan 1900. How do
> I convert this to a useful format, is there a standard conversion
> routine?
> Thanks
> Tim

There are (at least) two possible solutions. First, load the data into
a staging table and clean it up with TSQL, before an INSERT into the
final table:

insert into dbo.Destination
(col1, datetime_column, ...)
select col1, dateadd(dd, numdays_column, '19000101'), ...
from dbo.Staging

Alternatively, if you want to do the transformation in DTS, then you
could use the VBScript DateAdd() function in an ActiveX column
transformation to achieve the same thing.

Simon|||--> use DATEADD(dd,@.OffsetDays,'1 Jan 1900')

DECLARE @.OffsetDays BIGINT
SET @.OffSetDays = 38217
select DATEADD(dd,@.OffsetDays,'1 Jan 1900')

Tx