Ask a Question related to Coldfusion Database Access, Design and Development.
-
capik79 #1
alter field type
Hi Guys,
I'm using SQL server 2000.
How do I alter column/field from type int (with Identity = Yes Not For
Replication) to just normail int field. No more identity. I want it to be done
using SQL script( sql query analyzer).
Please help me on this, thx
Regards,
Shaffiq
capik79 Guest
-
Alter Table / Changing field types in SQL
Hi Folks - I was wondering if anybody knows of some way to convert a field within a MS SQL table from varchar to Numeric. A table was set up... -
Problem with character palette and Tracking field: can't type zero after type is modified
System: Illustrator CS, Panther 10.3.3 Try this: Create a few characters of type. Select some letters and change their tracking (Option + Command... -
Cast from type 'Field' to type 'String'
Hi, Getting the above error - further info shown below Line 36: II2 = 0 Line 37: response.write ("var questions" & II & " = new Array();"... -
Changing image type to ntext via ALTER TABLE
Hi Is there any way that we can change the data type of a column from 'image' type to 'ntext' via the ALTER TABLE command? Thanks -
text field that resizes as you type?
> So could flash make a text box that is one line wide and one line high, then when you type it grows in height not Your advice would be very... -
MikerRoo #2
Re: alter field type
There is no way to directly remove the identity setting.
You must store the column or the table to a temp table and then drop the
original column or table and then rename the copy to the original name.
Note that even when you change the table via Enterprise Manager (the only way
sanctioned by Microsoft); this copy, drop, and rename process is what happens
behind the scenes.
The attached shows how to remove the identity feature from column iID of the
table SOME_TABLE that has only one other column, sFoo.
Be sure to back up your database before trying this!
BEGIN TRANSACTION
CREATE TABLE dbo.Tmp_SOME_TABLE
(
iID int NOT NULL,
sFoo varchar(50) NOT NULL
)
GO
IF EXISTS (SELECT * FROM dbo.SOME_TABLE)
EXEC
(
'INSERT INTO dbo.Tmp_SOME_TABLE (iID, sFoo)
SELECT iID, sFoo
FROM dbo.SOME_TABLE TABLOCKX'
)
GO
DROP TABLE dbo.SOME_TABLE
GO
EXECUTE sp_rename N'dbo.Tmp_SOME_TABLE', N'SOME_TABLE', 'OBJECT'
GO
COMMIT
MikerRoo Guest
-
capik79 #3
Re: alter field type
Hi MikerRoo,
Thx for the solution. No wonder when i run alter command for column its not
working. Even analyzer return success message but changes not successfull.
Table still have an identity fields.
Thanks for the solution.
Regards,
Shaffiq
capik79 Guest



Reply With Quote

