Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Posts
    3

    Unanswered: How to create table with decimal field?

    How to write SQL to create table with decimal (10:3) field?
    then i write CREATE TABLE TEST (BANK NUMBER(10,3))
    or DECIMAL(10,3) FLOAT(10,3)
    it doesn't work
    thanks

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Feb 2004
    Posts
    3
    Sorry,
    exactly i want to create dBASE file (.dbf) from java and want to write SQL which creates table's fields numeric(10,3)

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Re: How to create table with decimal field?

    Originally posted by Mariokas
    How to write SQL to create table with decimal (10:3) field?
    then i write CREATE TABLE TEST (BANK NUMBER(10,3))
    or DECIMAL(10,3) FLOAT(10,3)
    it doesn't work
    thanks
    Try the next code



    Private Sub Befehl36_Click()
       Dim dbs As Database, tdf As TableDef, fld As Field
        Set dbs = CurrentDb
        Set tdf = dbs.CreateTableDef("zzEinkommen")
       ' Neues Feld in der Tabelle definieren.

       Set fld = tdf.CreateField("fldEinkommen", dbSingle)

       ' Field-Objekt an Fields-Auflistung des TableDef-Objekts anfügen.

       tdf.Fields.Append fld
       tdf.Fields.Refresh
       ' TableDef-Objekt an TableDefs-Auflistung der Datenbank anfügen.
       dbs.TableDefs.Append tdf
       dbs.TableDefs.Refresh
       Set dbs = Nothing
    End Sub


  5. #5
    Join Date
    Feb 2004
    Posts
    3
    I want to create decimal field and indicate the decimal value and exactly with SQL statement

Posting Permissions

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