This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting to Upper Case

 
Natesan Prabhakaran
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're talking about the german esset (ß), I don't think there's any uppercase for it.
 
Natesan Prabhakaran
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ä, ö, ü - 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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Natesan Prabhakaran
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2602
13
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Campbell Ritchie
Sheriff
Pie
Posts: 50258
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason we blocked the single RR is because too many people were using text-message abbreviations.
 
John Kimball
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic