Alter Table Command

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Charney

    #1

    Alter Table Command

    I am trying to alter a table that I imported data to. I can import the data
    just fine but when I run the following command:

    ALTER TABLE tblimport ADD COLUMN admit_date SmallDateTime

    It gives me the following error:

    Incorrect syntax near the keyword 'COLUMN'.

    I have tried several different versions of this but it always fails at this
    point.

    I am running MS-Access 2003 and connected to a SQL2000 server on the back
    end.

    Thanks for any help in advance.
    Mike Charney
  • Lyle Fairfield

    #2
    Re: Alter Table Command

    Michael Charney <nothing@everyt hing.net> wrote in
    news:Xns9790953 52D6EFcharneymb sbc@207.115.17. 102:
    [color=blue]
    > I am trying to alter a table that I imported data to. I can import the
    > data just fine but when I run the following command:
    >
    > ALTER TABLE tblimport ADD COLUMN admit_date SmallDateTime
    >
    > It gives me the following error:
    >
    > Incorrect syntax near the keyword 'COLUMN'.
    >
    > I have tried several different versions of this but it always fails at
    > this point.
    >
    > I am running MS-Access 2003 and connected to a SQL2000 server on the
    > back end.
    >
    > Thanks for any help in advance.
    > Mike Charney[/color]

    Did you try

    ALTER TABLE tblimport ADD admit_date SmallDateTime

    ?

    --
    Lyle Fairfield

    Comment

    • Michael Charney

      #3
      Re: Alter Table Command

      Lyle Fairfield <lylefairfield@ aim.com> wrote in
      news:Xns97909D9 8E8EDDlylefairf ieldaimcom@216. 221.81.119:
      [color=blue]
      > Michael Charney <nothing@everyt hing.net> wrote in
      > news:Xns9790953 52D6EFcharneymb sbc@207.115.17. 102:
      >[color=green]
      >> I am trying to alter a table that I imported data to. I can import the
      >> data just fine but when I run the following command:
      >>
      >> ALTER TABLE tblimport ADD COLUMN admit_date SmallDateTime
      >>
      >> It gives me the following error:
      >>
      >> Incorrect syntax near the keyword 'COLUMN'.
      >>
      >> I have tried several different versions of this but it always fails at
      >> this point.
      >>
      >> I am running MS-Access 2003 and connected to a SQL2000 server on the
      >> back end.
      >>
      >> Thanks for any help in advance.
      >> Mike Charney[/color]
      >
      > Did you try
      >
      > ALTER TABLE tblimport ADD admit_date SmallDateTime
      >
      > ?
      >[/color]

      Yea I finally figured it out that I did not need the word column in the
      statement.

      I have another question/problem with this though, I run the command and
      add three new columns, but when I open the table they do not show up? Is
      there something special that I need to do to see the columns?

      Mike Charney

      Comment

      • Lyle Fairfield

        #4
        Re: Alter Table Command

        Michael Charney <nothing@everyt hing.net> wrote in
        news:Xns9790A08 E17E4Fcharneymb sbc@207.115.17. 102:
        [color=blue]
        > Lyle Fairfield <lylefairfield@ aim.com> wrote in
        > news:Xns97909D9 8E8EDDlylefairf ieldaimcom@216. 221.81.119:
        >[color=green]
        >> Michael Charney <nothing@everyt hing.net> wrote in
        >> news:Xns9790953 52D6EFcharneymb sbc@207.115.17. 102:
        >>[color=darkred]
        >>> I am trying to alter a table that I imported data to. I can import
        >>> the data just fine but when I run the following command:
        >>>
        >>> ALTER TABLE tblimport ADD COLUMN admit_date SmallDateTime
        >>>
        >>> It gives me the following error:
        >>>
        >>> Incorrect syntax near the keyword 'COLUMN'.
        >>>
        >>> I have tried several different versions of this but it always fails
        >>> at this point.
        >>>
        >>> I am running MS-Access 2003 and connected to a SQL2000 server on the
        >>> back end.
        >>>
        >>> Thanks for any help in advance.
        >>> Mike Charney[/color]
        >>
        >> Did you try
        >>
        >> ALTER TABLE tblimport ADD admit_date SmallDateTime
        >>
        >> ?
        >>[/color]
        >
        > Yea I finally figured it out that I did not need the word column in
        > the statement.
        >
        > I have another question/problem with this though, I run the command
        > and add three new columns, but when I open the table they do not show
        > up? Is there something special that I need to do to see the columns?
        >
        > Mike Charney
        >[/color]

        <F5>

        --
        Lyle Fairfield

        Comment

        Working...