Skip to main content
September 19, 2024
Question

Import data from CSV to DB, saving null value

  • September 19, 2024
  • 2 replies
  • 0 views

I am trying to upload data from CSV to DB with these columns value - 

Region,

Country,

ItemType,

SalesChannel,

OrderPriority,

OrderDate,

OrderID,

ShipDate,

UnitsSold,

UnitPrice,

UnitCost,

TotalRevenue,

TotalCost,

TotalProfit"

but having a issue while save the data to db... it save the first 2 columns value and orderId value(PK) only and other columns saving with null value.....

please give me a quick solution

2 replies

jakubf0002
September 24, 2024

There is no enough information to guess what went wrong with this import but for sure you can double check:

column names - are those really camelCase?

column types - make sure that null are not due to wrong data type conversion

column capacity  - if there is enough space for each text

shubhama926776
September 25, 2024

Verify that all columns in your CSV file are correctly mapped to the appropriate database column name.