If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Turkish text file Load

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-24-03, 10:01
dvillani dvillani is offline
Registered User
 
Join Date: Aug 2003
Location: Italy
Posts: 33
Turkish text file Load

Anyone can help me?
How can I load Turkish text files (with special characters) into a DB2 table? I have tried the load setting the DB2CODEPAGE variable to 1208 and my DB were created as CODESET 'UTF-8' TERRITORY 'TR'.
Reply With Quote
  #2 (permalink)  
Old 10-27-03, 04:48
KezbanB KezbanB is offline
Registered User
 
Join Date: Jun 2003
Location: İstanbul
Posts: 19
Re: Turkish text file Load

Hi,

You have not given any explanation about the error messages you have or what the exact problem is (data is not being loaded, special characters doesn't seem to be correctly written into db..etc ). So I assume you have difficulty in writing and displaying Turkish characters in the text file.

I have tried the load oparation with your settings.
A database with CODESET 'UTF-8' and TERRITORY 'TR'

The command I have used to load data:
db2 load from C:\data.del of del modified by codepage=1254 replace into mytable

The format of the data in data.del file:
1, şçöiğü
2, ŞİÇÖĞÜ

Structure of mytable:
CREATE TABLE MYTABLE(
C1 INT,
C2 VARCHAR(50))

It works well with this configuration.

You can add "modified by codepage=1254" to your load command if you haven't before and then try.

I hope this helps.

KezbanB
__________________
Kezban
Reply With Quote
  #3 (permalink)  
Old 10-29-03, 11:39
dvillani dvillani is offline
Registered User
 
Join Date: Aug 2003
Location: Italy
Posts: 33
Many, many, many thanks.

I've tried your solution, and all is loaded right.

I have only a question. I noted that you imports turkish files with codepage=1254, but creating the DB with TR setting i have a codepage=1208? I have to change it? How can I change it?

One more time, many thanks.
Reply With Quote
  #4 (permalink)  
Old 10-29-03, 16:59
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Once the database is created you cannot change the codepage and territory

Sathyaram

Quote:
Originally posted by dvillani
Many, many, many thanks.

I've tried your solution, and all is loaded right.

I have only a question. I noted that you imports turkish files with codepage=1254, but creating the DB with TR setting i have a codepage=1208? I have to change it? How can I change it?

One more time, many thanks.
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 10-30-03, 06:12
dvillani dvillani is offline
Registered User
 
Join Date: Aug 2003
Location: Italy
Posts: 33
Quote:
Originally posted by sathyaram_s
Once the database is created you cannot change the codepage and territory

Sathyaram
I agree, but the only settings we can specify on a DB creation are only territory and code-set. I'm asking how to tell db2 to use a particular code page.
Reply With Quote
  #6 (permalink)  
Old 10-30-03, 17:45
sherman sherman is offline
Registered User
 
Join Date: Oct 2003
Posts: 7
Code set is a name for an encoding scheme. Code page is a number for an encoding scheme. You can find the code set and code page relationship in DB2 Administration Guide - National Language Consideration.

Sherman Lau
Reply With Quote
  #7 (permalink)  
Old 10-31-03, 03:37
dvillani dvillani is offline
Registered User
 
Join Date: Aug 2003
Location: Italy
Posts: 33
OK. Thanks.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On