• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Converting to Upper Case

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The reason we blocked the single RR is because too many people were using text-message abbreviations.
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
Is this the real life? Is this just fantasy? Is this a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic