Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    15

    Unanswered: Alter Column syntax

    Does anyone know how to alter a column format?

    Example I want to add a new column in SQL. The new column name is Cost. I want it to have a "standard" format single type

    In my alter command I can only specify the type but I don't know how to specify the format

    Alter table tblCustomers ADD Cost single;

    I want it to have a format of "Standard" of number(Integer) type.

    Any help or comments are greatly appreciated

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    I don't think you can change the format throug the Alter Table
    You can add new columns or drop old ones

    Docmd.runsql "ALTER TABLE wp ADD COLUMN yourFiledName single"
    Docmd.runsql "ALTER TABLE wp ADD COLUMN yourFiledName2 string (27)"

    To change the format, try to use the TableDef Objek

  3. #3
    Join Date
    Mar 2004
    Posts
    15
    how would i use the TableDef object?

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Just have look to that object in the help, there are also examples

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •