Solved

GUI/DDL/SSIS application

Posted on 2010-09-03
3
486 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 250 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 250 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

630 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