Re: SQL and Scientific Notation



Is that import value passed as a text field or number?
<<<< I am reading the value in from a text file using an ADO text driver.
The schema file only specifies header yes and that it is a comma delimited
file. The acutal file itself is not using any single or double quotes on any
of the fields. The other data types have not had any trouble.

and Temp_Import is an Access table with the Item
Number field being defined as a text field 35
characters long. When I executed the sql statement
I get the following value in my Item Number field:
1.23456789012346E+34

Do you mean as a 21 character text value or as a
number value?
<<<< I meant to say that the value that ended up as
12345678901234567890123456789012345 in my text file was now
1.23456789012346E+34 in my Access table. The Access table field has been
defined as type text and 35 characters long.

For what it is worth, your "1.23456789012346E+34"
value is exactly how FloatToStr() formats your input
number.

Does anyone know why the sql statement is switching
the data being read from the text file to scientific
notation?

How are you viewing the data? What is the data type
property of the TField for your "number" field?
<<<< I am viewing the data using Microsoft Access into a previously defined
table definition.




"John Herbster" <herb-sci1_at_sbcglobal.net> wrote in message
news:45ba5cf5$1@xxxxxxxxxxxxxxxxxxxxxxxxx

"Jeff" <jhoward@xxxxxxxxxxxx> wrote
Here is my sql statement:
INSERT INTO [Temp_Import] ([Item Number],[...] FROM [Large Import.txt]
IN "C:\Data\Delphi\Data\" "Text;"

The import value for Item Number is:
12345678901234567890123456789012345

Jeff,

Is that import value passed as a text field or number?

and Temp_Import is an Access table with the Item
Number field being defined as a text field 35
characters long. When I executed the sql statement
I get the following value in my Item Number field:
1.23456789012346E+34

Do you mean as a 21 character text value or as a
number value?

For what it is worth, your "1.23456789012346E+34"
value is exactly how FloatToStr() formats your input
number.

Does anyone know why the sql statement is switching
the data being read from the text file to scientific
notation?

How are you viewing the data? What is the data type
property of the TField for your "number" field?

Rgds, JohnH



.



Relevant Pages

  • Re: SQL and Scientific Notation
    ... defined as type text and 35 characters long. ... How are you viewing the data? ... What is the data type ... property of the TField for your "number" field? ...
    (borland.public.delphi.database.ado)
  • Re: No. of datatypes
    ... The best place to get all the data type will be SQl serevr Books online. ... Variable-length non-Unicode data with a maximum of 8,000 characters. ... Variable-length binary data with a maximum length of 8,000 bytes. ...
    (microsoft.public.sqlserver.programming)
  • Re: Reading GIF
    ... around that lets the programmer deal with a data type that Fortran ... signed integers than as characters. ... In theory, a compiler might not ... support 8-bit signed integers either, ...
    (comp.lang.fortran)
  • Re: Parameter query not working correct.
    ... If Text, be aware that the matching may be affected by invisible formatting characters, such as spaces, embedded carriage returns, or null characters. ... If you are still stuck after that, post the SQL statement, indicate the data type and size of these 2 fields, and the specific values that fail. ... pull along with the loan number and load ID. ...
    (microsoft.public.access.queries)
  • Re: How much space does the long character data type use.
    ... > than 11 characters in the EMPLID field. ... >>Look inside your SQL Server files with SQL File Explorer. ... How does this data type utilize disk space? ...
    (microsoft.public.sqlserver.server)