Re: Test for existance of field

Tech-Archive recommends: Fix windows errors by optimizing your registry



John Spiegel wrote:
There's also FSIZE(), returning 0 if the field doesn't exist.

Thanks Guys,

Fsize is the one!

IF FSIZE('startdate')=0
   ALTER table wip4copy ADD COLUMN startdate d(8)
ENDIF

Thanks

Steve
.



Relevant Pages

  • Re: A comparison of HLA to VC++...
    ... "Steve" instead, then he wouldn't magically alter into someone different, ... into OS X...an "apple" tastes the same whether you call it "apple", ...
    (alt.lang.asm)
  • Re: Adding columns to table with 3 millions rows
    ... dropping/re-createing the table with new format and then INSERT'ing into it - ... > Hi Steve, ... the column order shouldn't really matter. ... > ALTER TABLE OtherTable ...
    (microsoft.public.sqlserver.server)
  • Re: Snit frothing at the mouth
    ... accommodation here. ... > interesting to see if Steve is consistent and jumps in whining about how you ... Or failed to alter, in this case. ...
    (comp.sys.mac.advocacy)
  • Re: Slightly off topic : Today Screen order
    ... Start | Settings | Today | Items ... possible to alter the order in which the items appear on the Today ... So I am reinstalling everything again! ... Steve ...
    (microsoft.public.pocketpc.activesync)
  • Re: ALTER TABLE - to insert new column
    ... ALTER TABLE always add the column at the end. ... script" button in EM, you will see that it creates a new table. ... Tibor Karaszi, SQL Server MVP ... "Steve" wrote in message ...
    (microsoft.public.sqlserver.programming)