Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Convert Char(4) To int

Author  Topic 

obinna
Starting Member

26 Posts

Posted - 2007-06-12 : 08:05:39
I have a Column called PostNr which is of type Char(4)
I want to be able to Convert it to int
How can I accomplish that in query analyser, I tried changing it in Ent Manager, it keeps timing out.
I data in Post is in this format, does not contain illegal character just number

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-06-12 : 08:13:19
you want to change the column datatype in the table?



_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

obinna
Starting Member

26 Posts

Posted - 2007-06-12 : 08:17:35
Yep
Go to Top of Page

obinna
Starting Member

26 Posts

Posted - 2007-06-12 : 08:37:13
Solved

ALTER TABLE dbo.tbl_Streets
ALTER COLUMN PostNr int
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-06-13 : 03:30:05
Is this the "old" obinna_eke? Who has struggled with his address system for almost a year?



Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-13 : 08:31:46
quote:
Originally posted by Peso

Is this the "old" obinna_eke? Who has struggled with his address system for almost a year?



Peter Larsson
Helsingborg, Sweden


Name sounds like that

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -