Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is DMFLDR's method of dealing with field data with delimiters?

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces what is the processing method of field data with delimiters in DMFLDR. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

What if the corresponding field data in the data file to be loaded using dmfldr contains delimiters?

1. Create a test table

CREATE TABLE "SYSDBA". "TEST01"

(

"C1" VARCHAR2 (20)

C2 VARCHAR2 (20)

C3 VARCHAR2 (20)

"C4" VARCHAR2 (20) STORAGE (ON "MAIN", CLUSTERBTR)

two。 Edit data file

The test data are as follows:

1, "2", 3, 4

22, "3pr 40", 4pr 5

4556, "5", 6, 7

3. Edit control file

The editing control file test01.ctl is as follows:

OPTIONS

(

SKIP = 0

IGNORE_BATCH_ERRORS = TRUE

DIRECT = FALSE

)

LOAD DATA

INFILE'C:\ Users\ Think\ Desktop\ test01.txt'

INTO TABLE TEST01

FIELDS','

(

C1

C2 OPTIONALLY ENCLOSE BY'"'

C3

C4

)

4. Using control files to load data

D:\ dm7\ bin > dmfldr.exe userid=SYSDBA/SYSDBA@LOCALHOST:5236 CONTROL='c:\ text01.ctl'

Dmfldr V7.6.0.197-Build (2019.09.12-112648) ENT

Dmfldr:

Copyright (c) 2011, 2015, Dameng. All rights reserved.

Control file:

Rows loaded: all

Number of server rows per submission: 50000

Skip rows: 0

Number of errors allowed: 100

Whether to load directly: No

Whether to insert a self-incrementing column: No

Whether the data is sorted by clustered index: No

Character set: GBK

A total of 1 data files:

C:\ Users\ Think\ Desktop\ test01.txt

Error file: fldr.bad

Target table: TEST01

Column name wrapper data type termination

C1 CHARACTER

C2 CHARACTER

C3 CHARACTER

C4 CHARACTER

3 rows processed.

Target table: TEST01

3 lines loaded successfully.

Row 0 is discarded due to data format error.

Row 0 was not loaded due to a data error.

Total number of logical records skipped: 0

Total number of logical records read: 3

Total number of logical records rejected: 0

Usage time: 9.169 (ms)

5. Query test table data

SQL > select * from SYSDBA. "TEST01"

C1 C2 C3 C4

1 2 3 4

22 3,40 4 5

4556 56 7

As we can see, with the closure of dmfldr, the desired result can be achieved perfectly, and the field data with delimiters can be solved quickly.

About DMFLDR on the delimited field data processing method is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report