Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2017
    Posts
    2

    Unanswered: Sql: Decimal not working when creating table

    I am creating a table in Access2016 like this


    CREATE TABLE POLIS
    ( POLISNR CHAR (7) NOT NULL,
    START_DATE CHAR(8) NOT NULL ,
    ANNUAL_FEE DECIMAL (6,2) NOT NULL,
    DATE_LW CHAR(8) NOT NULL,
    PRIMARY KEY (POLISNR)
    )

    When running, an error occurs: "Syntax error in field definition" (translated from Dutch). The error points towards the DECIMAL

    When using REAL instead of DECIMAL, it works
    When using FLOAT instead of DECIMAL, it also doesn't work.


    Anyone knows what is wrong here? Thanks in advance!

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    614
    Provided Answers: 32
    dont create a table with sql.
    just use the table designer.

  3. #3
    Join Date
    Oct 2017
    Posts
    2
    Quote Originally Posted by ranman256 View Post
    dont create a table with sql.
    just use the table designer.
    Actually, it's an assigment for my students. Of course they are learning to make tables bij designing them as well. But it would be great if this would work.

  4. #4
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    614
    Provided Answers: 32
    but its the wrong methodology. IF you want the correct data types, create them in designer.
    using sql is random since it 'guesses' at the data type.

Posting Permissions

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