Skip to Content
author's profile photo Former Member
Former Member

having issue in loading data. (value of a field is changing)

Hello everyone,

Executing sql that i found in the sql developer site.

Following is my table definition

CREATE COLUMN TABLE "<SCHEMA_NAME>"."ARTICLE_COLOR_LOOKUP"(

"ARTICLE_COLOR_LOOKUP_ID" INTEGER NOT NULL,

"ARTICLE_ID" INTEGER NOT NULL,

"COLOR_CODE" INTEGER NULL,

"ARTICLE_LABEL" VARCHAR(255) NULL,

"COLOR_LABEL" VARCHAR(255) NULL,

"CATEGORY" VARCHAR(255) NULL,

"SALE_PRICE" DECIMAL NULL,

"FAMILY_NAME" VARCHAR(30) NULL,

"FAMILY_CODE" VARCHAR(3) NULL,

PRIMARY KEY ("ARTICLE_COLOR_LOOKUP_ID","ARTICLE_ID") );

Issue is: the value for sales price field is varying from those in excel file. i tried to export the sql command of the table

CREATE COLUMN TABLE "satish"."ARTICLE_COLOR_LOOKUP" ("ARTICLE_COLOR_LOOKUP_ID" INTEGER CS_INT NOT NULL ,

"ARTICLE_ID" INTEGER CS_INT NOT NULL ,

"COLOR_CODE" INTEGER CS_INT,

"ARTICLE_LABEL" VARCHAR(255),

"COLOR_LABEL" VARCHAR(255),

"CATEGORY" VARCHAR(255),

"SALE_PRICE" DECIMAL CS_DECIMAL_FLOAT,

"FAMILY_NAME" VARCHAR(30),

"FAMILY_CODE" VARCHAR(3),

PRIMARY KEY ("ARTICLE_COLOR_LOOKUP_ID",

"ARTICLE_ID")) UNLOAD PRIORITY 5 AUTO MERGE

data after loading into the table. sales price fields data varies from the data in sample file and the data in table.

how can rectify this issue.

pastedImage_0.png (24.4 kB)
pastedImage_1.png (28.3 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2014 at 10:06 PM

    Hi,

    for price columns it is better to use fixed-point DECIMAL type, e.g. DECIMAL(10, 2). Default DECIMAL is a floating-point type which will not be represented correctly.

    -- Micha

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.