473,385 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

probleum in changing the data type of column

198 100+
hello expert
can any one help me by providing the method how can i change the data type of column in sql server
originally my column data type is numeric and i want to change it into integer
i use the covert command but it is not changing the data type of column

please provide some help
thanks in advance
Dec 20 '07 #1
5 2163
hello expert
can any one help me by providing the method how can i change the data type of column in sql server
originally my column data type is numeric and i want to change it into integer
i use the covert command but it is not changing the data type of column

please provide some help
thanks in advance
You can chage it this way

Expand|Select|Wrap|Line Numbers
  1. ALTER TABLE <TABLE_NAME> 
  2. ALTER COLUMN <COLUMN_NAME> NUMERIC
Dec 20 '07 #2
veer
198 100+
hello expert
it is not working
it is producing the syntax error near keyword alter


You can chage it this way

Expand|Select|Wrap|Line Numbers
  1. ALTER TABLE <TABLE_NAME> 
  2. ALTER COLUMN <COLUMN_NAME> NUMERIC
Dec 21 '07 #3
debasisdas
8,127 Expert 4TB
Here is the complete syntax.

ALTER TABLE <table>
{ [ ALTER COLUMN <column_name>
{ <new_data_type> [ ( <precision> [ , <scale> ] ) ]
Dec 21 '07 #4
veer
198 100+
HELLO EXPERT
PLEASE CONVERT THIS SYNTAX INTO EXAMPLE
MY TABLE NAME IS "OUTPUT"
MY COLUMN NAME IS "ENTRY"
COLUMN DATA TYPE IS NUMERIC


THANKS IN ADVANCE




Here is the complete syntax.

ALTER TABLE <table>
{ [ ALTER COLUMN <column_name>
{ <new_data_type> [ ( <precision> [ , <scale> ] ) ]
Dec 22 '07 #5
debasisdas
8,127 Expert 4TB
Try This

alter Table Output Alter Column Entry Numeric (5,2)
Dec 24 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: iporter | last post by:
Hi - I am changing a field from type nvarchar to type text, given that I need to store strings longer than 255 characters. To do this I change the data type in SQL Server, then I change the...
1
by: Geoff Jones | last post by:
Hi Is it possible to change the type of data a column holds in DataTable at runtime? For example, suppose that the table column originally holds Strings, can we, at runtime, change it to...
2
by: EricaLRivera | last post by:
Hi Y'all I was hoping someone out there might be able to help me. I have an access program that needs to change the data types programatically. I have tried to do an alter column to change the...
2
by: veer | last post by:
hello expert i made a website which opens in ie6 and works fine but when i open it in ie7 it creates probleum the probleum is that i have a footer in my webpage , it automatically moves in the...
3
by: veer | last post by:
Hi i run this query it works fine Select Yp1VOp,count(*) as instrec into instrec from " & txttablename & " where Yp1EOp=Yp1VOp Group By Yp1EOp,Yp1Vop Order By Yp1EOp,Yp1VOp but when i put a...
7
by: veer | last post by:
Hi i have a mdb table in which i want to access the data from mdb table into new table i,e Operator but the condition is if the data in first row of column say "operator_code" is "alfred" . The name...
4
by: veer | last post by:
hi i have programe in which works fine for seaching the data from a file but when the i want to seach the word like" mögen ". In this word " ö " has some other kind of shap and my programe did not...
2
by: veer | last post by:
Hi i made a programe in which i want to calculate the total time from a column but when i declare a variable having datatype is "date" then the default value in this variable is "12:00:00: and...
3
by: veer | last post by:
Hi i have some probleum in reading the data from .val extension file when i manually open the file in notepad and just click on file option -> save -> close the txt file and then read the data...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.