January 21, 2009 at 7:01 am
munishprathap (1/20/2009)
Thanks friends for all your supporti can achieve this task by the following Query,please let me know your feedback
IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Note'
AND COLUMN_NAME = 'LastModifyBy'
AND DATA_TYPE = 'datetime' )
BEGIN
ALTER TABLE [dbo].[Note] ALTER COLUMN LastModifyBy VARCHAR
UPDATE [dbo].[Note]
SET LastModifyBy='0'
ALTER TABLE [dbo].[Note] ALTER COLUMN LastModifyBy BIGINT
END
Id addition to answering Jeff's question:
What version of SQL Server are you using? - This is a SQL Server 7,2000 forum section.
Have you tested the code?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 22, 2009 at 12:14 pm
The OP has ignored repeated requests as to the WHY of it.
On top of that he has been warned repeatedly that is a bad idea.
If all he wants is a code drone to issue an SQL statement and closes the door to man-centuries of expertise in doing it the right way, I suggest we let this thread die right now.
Let us not waste a second more of our time with this.
January 22, 2009 at 6:54 pm
J (1/22/2009)
The OP has ignored repeated requests as to the WHY of it.On top of that he has been warned repeatedly that is a bad idea.
If all he wants is a code drone to issue an SQL statement and closes the door to man-centuries of expertise in doing it the right way, I suggest we let this thread die right now.
Let us not waste a second more of our time with this.
Heh... I wonder if the OP likes pork chops. :hehe:
[font="Arial Black"]SLAM![/font]
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 31 through 32 (of 32 total)
You must be logged in to reply to this topic. Login to reply