aspose file tools*
The moose likes JDBC and the fly likes Converting to Upper Case Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Converting to Upper Case" Watch "Converting to Upper Case" New topic
Author

Converting to Upper Case

Natesan Prabhakaran
Ranch Hand

Joined: Jul 11, 2006
Posts: 47
Hi All,

when i try to convert the German character from Lower case to Upper case in SQL Query, it is not working.

I dont know, is it right place to ask this question. But i have very urgent issue. If anyone have idea, Please advise. Thanks.

Regards,
Prabhakaran.N


Regards,
Prabhakaran.N
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


when i try to convert the German character from Lower case to Upper case in SQL Query, it is not working

What is happening? Which character are you trying to convert?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

If you're talking about the german esset (ß), I don't think there's any uppercase for it.


[My Blog]
All roads lead to JavaRanch
Natesan Prabhakaran
Ranch Hand

Joined: Jul 11, 2006
Posts: 47
ä, ö, ü - These are the German characters, i can not conver from ä ö ü to Ö Ü Ä in SQL Query. In java we can chage the case. but for search engine, case sensitive made big problem.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41809
    
  62
I think it would help if you told us what exactly you're trying to do - post the SQL code you're executing that performs the conversion, and tell us in detail what happens when you execute it.


Ping & DNS - my free Android networking tools app
Natesan Prabhakaran
Ranch Hand

Joined: Jul 11, 2006
Posts: 47
In Java - german esset (ß) - in converted to "SS" when we change the case. but in Query

select distinct(RESP_CTR), BRANCH_NAME from GTDFSEA.sebz_branch where AUTHORIZED_IND='A' and DELETED_FLG=0 and UPPER(BRANCH_NAME) like 'BALÜ%'

In this Query UPPER(BRANCH_NAME) is not working only for German Charcaters (ä ö ü ).
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41809
    
  62
Strictly speaking, an uppercase of "ß" doesn't exist, so I'm not surprised that Java and SQL do different things when asked to perform the conversion. How about doing something like

LOWER(BRANCH_NAME) like 'balü%'

where the "balü" part is lowercased in the Java code?
Natesan Prabhakaran
Ranch Hand

Joined: Jul 11, 2006
Posts: 47
yes. but In database BRANCH_NAME appears BALÜCARE, user enters balücase. so i am changing case to upper in java for user entered values. Also to successed the query, i am doing

UPPER(BRANCH_NAME)

This query not produce any result. English characters are converted to upper but the german character ü is not. This is applicable for both the convertions. Upper to Lower and Lower to Upper.

Regards,
Prabhakaran.N
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2499
    
    8

In database BRANCH_NAME appears BALÜCARE, user enters balücase.
There is another mismatch. Upper case s will never match the _R_* in the second last position.



* note to JavaRanch. I tried to type a character RR (but then only one of them) here, but got this message:
The specific error message is: " r" is a silly English abbreviation; use "are" instead.

OCUP UML fundamental and ITIL foundation
youtube channel
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30506
    
150

Jan,
Can you e-mail me the exact text you were trying to post that gave you the error. (My e-mail is in my profile if you click the link.)

Thanks,
Jeanne


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38765
    
  23
The reason we blocked the single RR is because too many people were using text-message abbreviations.
John Kimball
Ranch Hand

Joined: Apr 13, 2009
Posts: 96
Does your DBMS have a string/char replacement function, which you can nest?

If so, you can do something like the following:


Otherwise, you'd have to account for every combination:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Converting to Upper Case