and whats worse is that CREATE DEFAULT cannot be used as part of a batch of
commands.

tedium_level++

> -----Original Message-----
> From: Rich Wild [mailto:[EMAIL PROTECTED]
> Sent: 03 March 2003 16:57
> To: '[EMAIL PROTECTED]'
> Subject: RE: [ cf-dev ] OT: dropping a column
> 
> 
> hmm, just saw this in sqlbol:
> 
> "A column cannot be dropped if it is:
> Associated with a default defined with the DEFAULT keyword, 
> or bound to a
> default object. "
> 
> Guess I'll have to use CREATE DEFAULT statements and then 
> sp_bindefault
> after creating the column, then sp_unbinddefault and then 
> drop default and
> then drop column.
> 
> how tedious.
> 
> 
> 
> > -----Original Message-----
> > From: Rich Wild [mailto:[EMAIL PROTECTED]
> > Sent: 03 March 2003 16:38
> > To: '[EMAIL PROTECTED]'
> > Subject: [ cf-dev ] OT: dropping a column
> > 
> > 
> > Having a problem with dropping a column in sql server 2000.
> > 
> > First off, I add a column:
> > 
> > ALTER TABLE myTable ADD thisCol VARCHAR(250) DEFAULT 'stong 
> > like bull' NULL
> > 
> > then, I try to get rid of it:
> > 
> > ALTER TABLE myTable DROP COLUMN thisCol
> > 
> > but it does of death when it realises that the column has a 
> > default value
> > object that relies on that column.
> > 
> > How can I get it to drop the default (which is given a random 
> > name by sql
> > server along the lines of 'DF__form_meta__colum__36B12243') 
> > and thus drop
> > the column?
> > 
> > 
> > 
> > -------------------------------------------------------
> > Rich Wild
> > Senior Web Developer
> > 
> > -------------------------------------------------------
> > e-mango                             Tel: 01202 755 300
> > Gild House                      Fax: 01202 755 301
> > 74 Norwich Avenue West
> > Bournemouth                   Mailto:[EMAIL PROTECTED]
> > BH2 6AW, UK                      http://www.e-mango.com
> > -------------------------------------------------------
> > This message may contain information which is legally
> > privileged and/or confidential.  If you are not the
> > intended recipient, you are hereby notified that any
> > unauthorised disclosure, copying, distribution or use
> > of this information is strictly prohibited. Such
> > notification notwithstanding, any comments, opinions,
> > information or conclusions expressed in this message
> > are those of the originator, not of e-mango.com ltd,
> > unless otherwise explicitly and independently indicated
> > by an authorised representative of e-mango.com ltd.
> > -------------------------------------------------------
> > 
> > 
> > -- 
> > ** Archive: 
http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to