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 > What is the EQUIVALENT OF NLS_LANGUAGE(oracle) IN DB2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-29-04, 01:54
mailar mailar is offline
Registered User
 
Join Date: Nov 2004
Posts: 6
Unhappy What is the EQUIVALENT OF NLS_LANGUAGE(oracle) IN DB2

Hi,
Can anyone help me?
I need to know what is the equivalent of NLS_LANGUAGE or
NLS_CHARACTER _SET parameter of Oracle in DB2.
I want to see the current date in language other than english.
say in Arabic , so how do I do that?

For your information
the query
SELECT TO_CHAR(SYSDATE,'MON','NLS_DATE_LANGUAGE=ARABIC') FROM DUAL;
will return the month name (first 3 letters of the month) in Arabic language.
I wish to do the same in DB2.

Thanks in advance
mailar
Reply With Quote
  #2 (permalink)  
Old 11-29-04, 01:58
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
nls

there is none
you have to bind the cli or your application with the option date ....
to get the data in a specific format
Best Regards, Guy Przytula
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #3 (permalink)  
Old 11-29-04, 08:04
mailar mailar is offline
Registered User
 
Join Date: Nov 2004
Posts: 6
How do I do this Binding?

Can you please tell me more about this binding?
An example would be highly helpful I suppose

Reply With Quote
  #4 (permalink)  
Old 11-29-04, 08:29
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,

Try this out:
Code:
select substr(monthname('2004-01-01'),1,3) from sysibm.sysdummy1
Note: date is written in ISO standard format: year-month-day.

Hope this helps,
Grofaty
Reply With Quote
  #5 (permalink)  
Old 11-30-04, 02:57
mailar mailar is offline
Registered User
 
Join Date: Nov 2004
Posts: 6
Red face But what about languages like Arabic

Hey Grofaty,
Thanks for the query but I want to know the date in various languages like Arabic , Chinese which I can specify using NLS_DATE_LANGUAGE parameter of TO_CHAR function (in Oracle). So, please tell me how can I do the same in DB2
Reply With Quote
  #6 (permalink)  
Old 11-30-04, 04:36
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
date format

I don't think this is possible
the only formatting possibilities are with date format at bind time
[DATETIME {DEF | USA | EUR | ISO | JIS | LOC}]
if the client is english you will get months... in english ..
Best regards, Guy Przytula
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #7 (permalink)  
Old 11-30-04, 07:03
kdima71 kdima71 is offline
Registered User
 
Join Date: Nov 2004
Posts: 23
Hi all!

I am sorry for mine poor English!

I have DB2 UDB 8.2 for Win2000.

I while the beginner in DB2 (9 years of experience in Oracle) also. I too have the same problem and can only offer as workaround (checked up only in my environment), set country, necessary for you, in Local preferences of the DB2 instance user account. After that a title month, day of week will be mapped in language of the established country.

P.S. See also http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=291&thread=64959&message=51326 73. Here my problem, which has remained without the answer.

Best regards, Dmitriy.

Last edited by kdima71; 11-30-04 at 08:13.
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