Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-06-2007, 04:59 PM
bbq bbq is offline
Senior Member
 
Join Date: Jun 2007
Posts: 134
bbq is on a distinguished road
ñ in an oracle query
I have this problem when I try to execute this code:
Code:
String sql="SELECT DISTINCT M.AÑO_PERIODO_ACADEMICO_EST,NUM_SEM_PERIODO_ACAD_EST FROM CARRERA C,MATRICULA M,PERIODO_ACADEMICO P,ESTUDIANTE E WHERE C.CODIGO_ESTUDIANTE=? AND P.AÑO=M.AÑO_PERIODO_ACADEMICO_EST AND P.NUMERO=M.NUM_SEM_PERIODO_ACAD_EST AND E.TIPO_DOCUMENTO=C.TIPO_DOCUMENTO_EST AND E.NUMERO_DOCUMENTO=C.NUMERO_DOCUMENTO_EST AND C.TIPO_DOCUMENTO_EST=M.TIPO_DOCUMENTO_EST AND C.NUMERO_DOCUMENTO_EST=M.NUMERO_DOCUMENTO_EST AND ( m.COD_SITUACION_ACADEMICA_EST NOT IN ('C','G','F','S','T','P') OR m.COD_SITUACION_ACADEMICA_EST IS NOT NULL ) AND m.COD_SITUACION_ACADEMICA_EST!='T'"; prpStmt = connection.prepareStatement(sql); int i=1; prpStmt.setInt(i++,codigo_estudiante); resultSet = prpStmt.executeQuery();
But it returns me an error because of the character "ñ"
I need this ñ, I can't delete it, how can I fix that?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-07-2007, 02:53 PM
Senior Member
 
Join Date: Jun 2007
Posts: 164
Heather is on a distinguished road
I had the same problem, and I resolved it putting "\" before the word with ñ starts

Code:
String sql="SELECT DISTINCT M.\"AÑO_PERIODO_ACADEMICO_EST\", NUM_SEM_PERIODO_ACAD_EST FROM CARRERA C,MATRICULA M,PERIODO_ACADEMICO P,ESTUDIANTE E WHERE C.CODIGO_ESTUDIANTE=? AND P.AÑO=M.\"AÑO_PERIODO_ACADEMICO_EST\" AND P.NUMERO=M.NUM_SEM_PERIODO_ACAD_EST AND E.TIPO_DOCUMENTO=C.TIPO_DOCUMENTO_EST AND E.NUMERO_DOCUMENTO=C.NUMERO_DOCUMENTO_EST AND C.TIPO_DOCUMENTO_EST=M.TIPO_DOCUMENTO_EST AND C.NUMERO_DOCUMENTO_EST=M.NUMERO_DOCUMENTO_EST AND ( m.COD_SITUACION_ACADEMICA_EST NOT IN ('C','G','F','S','T','P') OR m.COD_SITUACION_ACADEMICA_EST IS NOT NULL ) AND m.COD_SITUACION_ACADEMICA_EST!='T'";
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-04-2007, 08:53 AM
Senior Member
 
Join Date: Jun 2007
Posts: 130
Jack is on a distinguished road
the field that has the "ñ" put " "
Code:
SELECT "Id_Niño", Date FROM "niños"
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help in Query geeta_ravikanti Database 0 03-31-2008 02:16 PM
Using sql:query tag Java Tip Java Tips 0 01-15-2008 04:13 PM
Using sql:query tag Java Tip Java Tips 0 01-14-2008 10:31 AM
How to create a xml file from oracle sql query boy22 XML 1 07-24-2007 01:15 AM
oracle query with date question orchid Database 1 05-09-2007 01:10 AM


All times are GMT +3. The time now is 11:36 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org