Showing posts with label upgrading. Show all posts
Showing posts with label upgrading. Show all posts

Tuesday, March 27, 2012

Changing column from nvarchar to int

I am upgrading an Access database and need to convert some of the fields
from text to a foreign key from another table. This is no problem and I
already have the query batch to do this. I would like to know if it is
possible to change a column type from nvarchar to int.
Thanks,
Drew LaingAs long as all the NVARCHAR values can be converted to an INT, sure.
ALTER TABLE tablename ALTER COLUMN columnname INT
http://www.aspfaq.com/
(Reverse address to reply.)
"Drew" <drew.laing@.NOswvtc.dmhmrsas.virginia.SPMgov> wrote in message
news:uMwE9OZJFHA.3184@.TK2MSFTNGP10.phx.gbl...
> I am upgrading an Access database and need to convert some of the fields
> from text to a foreign key from another table. This is no problem and I
> already have the query batch to do this. I would like to know if it is
> possible to change a column type from nvarchar to int.
> Thanks,
> Drew Laing
>|||Drew,
You can do it if the values are numeric or null. If the value can not be
casted, then you will get an error.
Example:
use northwind
go
create table t (
colA varchar(15)
)
go
insert into t values('1')
insert into t values('2')
insert into t values(null)
go
select * from t
go
alter table t
alter column colA int
go
select * from t
go
alter table t
alter column colA varchar(15)
go
insert into t values ('a')
go
-- will fail
alter table t
alter column colA int
go
select * from t
go
drop table t
go
AMB
"Drew" wrote:

> I am upgrading an Access database and need to convert some of the fields
> from text to a foreign key from another table. This is no problem and I
> already have the query batch to do this. I would like to know if it is
> possible to change a column type from nvarchar to int.
> Thanks,
> Drew Laing
>
>|||Thanks to both!
Thanks,
Drew
"Drew" <drew.laing@.NOswvtc.dmhmrsas.virginia.SPMgov> wrote in message
news:uMwE9OZJFHA.3184@.TK2MSFTNGP10.phx.gbl...
>I am upgrading an Access database and need to convert some of the fields
>from text to a foreign key from another table. This is no problem and I
>already have the query batch to do this. I would like to know if it is
>possible to change a column type from nvarchar to int.
> Thanks,
> Drew Laing
>

Changing Collation SQL 2000 sp4

Hello
We just upgraded to SQL server 2000 sp3a from sp4 . Could the
collation
change upgrading to SP4 (from SQL_Latin1_General_CP1_CS_AS to
SQL_Latin1_General_CP1_CI_AS. Or can that only be changed on the
initial installation.
ThanksHi
"jsully79" wrote:

> Hello
> We just upgraded to SQL server 2000 sp3a from sp4 . Could the
> collation
> change upgrading to SP4 (from SQL_Latin1_General_CP1_CS_AS to
> SQL_Latin1_General_CP1_CI_AS. Or can that only be changed on the
> initial installation.
> Thanks
I have not know the collation change when applying the service pack. To do
for the whole system would have required alot of work. Are you asking about
a
specific database/column/setting?
John

Changing Collation SQL 2000 sp4

Hello
We just upgraded to SQL server 2000 sp3a from sp4 . Could the
collation
change upgrading to SP4 (from SQL_Latin1_General_CP1_CS_AS to
SQL_Latin1_General_CP1_CI_AS. Or can that only be changed on the
initial installation.
ThanksHi
"jsully79" wrote:
> Hello
> We just upgraded to SQL server 2000 sp3a from sp4 . Could the
> collation
> change upgrading to SP4 (from SQL_Latin1_General_CP1_CS_AS to
> SQL_Latin1_General_CP1_CI_AS. Or can that only be changed on the
> initial installation.
> Thanks
I have not know the collation change when applying the service pack. To do
for the whole system would have required alot of work. Are you asking about a
specific database/column/setting?
John

Changing Collation SQL 2000 sp4

Hello
We just upgraded to SQL server 2000 sp3a from sp4 . Could the
collation
change upgrading to SP4 (from SQL_Latin1_General_CP1_CS_AS to
SQL_Latin1_General_CP1_CI_AS. Or can that only be changed on the
initial installation.
Thanks
Hi
"jsully79" wrote:

> Hello
> We just upgraded to SQL server 2000 sp3a from sp4 . Could the
> collation
> change upgrading to SP4 (from SQL_Latin1_General_CP1_CS_AS to
> SQL_Latin1_General_CP1_CI_AS. Or can that only be changed on the
> initial installation.
> Thanks
I have not know the collation change when applying the service pack. To do
for the whole system would have required alot of work. Are you asking about a
specific database/column/setting?
John

Tuesday, March 20, 2012

Changes to MDX when upgrading to AS 2005

I was wondering if anybody has upgraded to AS 2005 without having to change
their stored MDX extensively to work with the new AS model. The company I
work for has 100's of reports with 100's of MDX queries that might
potentially need to be updated because 1) it's just not possible to do things
the old way and 2) we want to utilize the new features of SSAS 2005.
I'm looking for general advice or maybe some good things to know when
upgrading to SSAS 2005 while using SSRS 2005 as your enterprise reporting
framework.
Thanks,
Joshhavent got anything definitive, other than to say our mdx based reports
ported fine. Only issue was 2005 was stricter with having links in page
footers which caused a warning in 2000 but wouldnt work in 2005
"JSI" <JSI@.discussions.microsoft.com> wrote in message
news:B909920B-124C-4B09-B584-2EF40847F3B6@.microsoft.com...
>I was wondering if anybody has upgraded to AS 2005 without having to change
> their stored MDX extensively to work with the new AS model. The company I
> work for has 100's of reports with 100's of MDX queries that might
> potentially need to be updated because 1) it's just not possible to do
> things
> the old way and 2) we want to utilize the new features of SSAS 2005.
> I'm looking for general advice or maybe some good things to know when
> upgrading to SSAS 2005 while using SSRS 2005 as your enterprise reporting
> framework.
> Thanks,
> Josh