Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

GUI/DDL/SSIS application

Posted on 2010-09-03
3
Medium Priority
?
492 Views
Last Modified: 2012-05-10
If we were to change the datatype of a field of a table, please advise which of the following to use:

1) SSMS GUI
2) DDL T-SQL code
3) SSIS

Thanks.
0
Comment
Question by:ksfok
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 21

Accepted Solution

by:
Dale Burrell earned 750 total points
ID: 33601529
Dunno what all those acronyms are :) firstly is changing the datatype going to affect the data and/or the application using the data?

Assuming all is OK to change the datatype then you can either open the table definition for design in Management Studio or run the T-SQL from Query Analyser e.g.

alter table MyTable alter column MyColumn NewDataType -- and you can set null/not null etc as well here

If there is a default associated with the column you will probably have to drop that first.
0
 
LVL 15

Assisted Solution

by:AmmarR
AmmarR earned 750 total points
ID: 33616795
dale_burrell: has covered every thing

so you can use SSMS GUI or DDL T-SQL code both will work.

and you dont need SSIS to change a field datatype.

in many cases if there is data in the table already,  SSMS GUI, will not work and wont allow you to change the datatype, so you will be left with T-sql only.

but you need to make sure from what datatype to what datatype are you changing, because if you do a wrong conversion you might lose your data.

Regards
0
 

Author Closing Comment

by:ksfok
ID: 33746100
OK
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question