Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / October 2003

Tip: Looking for answers? Try searching our database.

JDBC:how to compare char[] and int

Thread view: 
longskyhw - 22 Oct 2003 08:56 GMT
the type of database column is char[2], how can i compare it to a int
through JDBC? The database isn't support TO_NUMBER(column) >= i.
Thanks a lot!
Lee Fesperman - 22 Oct 2003 10:21 GMT
> the type of database column is char[2], how can i compare it to a int
> through JDBC? The database isn't support TO_NUMBER(column) >= i.
> Thanks a lot!

JDBC won't help you; it will have to be SQL. Perhaps your DBMS supports an equivalent
construct, like CAST. Which DBMS is it?

Signature

Lee Fesperman, FirstSQL, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS  (http://www.firstsql.com)

longskyhw - 23 Oct 2003 07:35 GMT
Thank your answer.
The DBMS is Himalaya.

> > the type of database column is char[2], how can i compare it to a int
> > through JDBC? The database isn't support TO_NUMBER(column) >= i.
> > Thanks a lot!
>
> JDBC won't help you; it will have to be SQL. Perhaps your DBMS supports an equivalent
> construct, like CAST. Which DBMS is it?
Lee Fesperman - 24 Oct 2003 00:46 GMT
> Thank your answer.
> The DBMS is Himalaya.

Sorry, I'd never heard of it. I'm afraid you'll have to scour through the docs.

Look for CAST (the SQL92 construct) or perhaps CONVERT.

Signature

Lee Fesperman, FirstSQL, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS  (http://www.firstsql.com)

longskyhw - 24 Oct 2003 06:23 GMT
thank you a lot.
I will look at it.

> > Thank your answer.
> > The DBMS is Himalaya.
>
> Sorry, I'd never heard of it. I'm afraid you'll have to scour through the docs.
>
> Look for CAST (the SQL92 construct) or perhaps CONVERT.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.