Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

adding a filed in table is impossible!! Expand / Collapse
Author
Message
Posted Tuesday, December 3, 2013 11:27 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, December 28, 2013 6:04 AM
Points: 107, Visits: 940
Hi
I want to add a filed in my table , but I receive an error , this is : save as text file !!!!
and I have to delete all my DB and create it again, would you please help me?
Post #1519482
Posted Tuesday, December 3, 2013 11:37 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:21 PM
Points: 42,495, Visits: 35,566
What exactly are you trying to do, what is the exact error you're getting?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1519486
Posted Tuesday, December 3, 2013 11:44 PM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Today @ 6:18 AM
Points: 659, Visits: 888
I think u r trying to add column from designer ?

Add column by using sql script
Ex:
ALTER TABLE Table_Name ADD COLUMN_NAME INT

If u want add column from designer , before adding do this changes ,
Tools---> Options--->Designers-->
Un-check this check box: Prevent Saving changes that require table recreation and click ok
Post #1519493
Posted Wednesday, December 4, 2013 12:50 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, December 28, 2013 6:04 AM
Points: 107, Visits: 940
Yes, Exactlty , I want to add a column , of course I have created my table before , an it has data , but now I want to add a column to my table an it does not permit me, it said : save as text file.
Post #1519507
Posted Wednesday, December 4, 2013 1:04 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:21 PM
Points: 42,495, Visits: 35,566
'Save as text file' is not an error. It's very hard to help you without knowing exactly what you're doing and having a description of the error you're getting.

Are you using the GUI designer to add a column?
If so, what is the error you are getting ('save as text file isn't an error')
Have you tried using T-SQL to add the column?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1519510
Posted Wednesday, December 4, 2013 1:21 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, December 28, 2013 6:04 AM
Points: 107, Visits: 940
Yes, in design mode I want to add a column, I said it is error because it does not add a column really, It wants to save my table as a text in my hard , without changing my table , I think it is because of permission , do u think so?
Post #1519513
Posted Wednesday, December 4, 2013 1:29 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:21 PM
Points: 42,495, Visits: 35,566
I don't know if it's due to permission because you still haven't posted the error. If there's an error, it would have been displayed in a dialog.

Have you tried using the T-SQL command instead of the designer?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1519516
Posted Wednesday, December 4, 2013 1:43 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Friday, April 25, 2014 1:07 AM
Points: 699, Visits: 479
Sounds like you're trying to add a column mid-table which is causing a table rebuild and hence it won't automatically do this unless you de-select the option from => Tools => Options => Designer = Untick 'Prevent saving changes that require table re-creation'.

You really shouldn't be adding columns mid-table however, an ALTER TABLE statement is better. Imagine trying this with a billion row production table. The DBA's wouldn't allow it for starters ;)



Post #1519519
Posted Wednesday, December 4, 2013 3:46 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, July 18, 2014 3:05 AM
Points: 49, Visits: 175
Yes,try to do that
Options => Designer = Untick 'Prevent saving changes that require table re-creation'. it will work.!!
Post #1519549
Posted Wednesday, December 4, 2013 5:49 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 11:29 AM
Points: 3,999, Visits: 3,022
Or you could skip the GUI completely and use the following, changing integer to the data type you need.

ALTER TABLE table_name ADD column_name integer;

http://msdn.microsoft.com/en-us/library/ms190273%28v=sql.100%29.aspx



Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
Post #1519576
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse