Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,986 of 2,288    |
|    Sven Mayer to All    |
|    Converting NUMBER, DATE and VARCHAR2 dat    |
|    26 Jan 05 23:11:20    |
      XPost: comp.databases.oracle.misc, microsoft.public.sqlserver.programming,       comp.databases.ibm-db2       From: hamiltonx@lycos.com              Assume a database (e.g. Oracle) field is declared as       a) NUMBER (length=10)       b) NUMBER (length=26)       c) VARCHAR2 (length=1)       d) VARCHAR2 (length=50)       e) DATE              How do I retrieve the contents from these resultset fields and put it into a       (numeric) java resp Date field?              For other field types it is already clear e.g.):              ResultSet rs = executeQuery(....);       ...              int i = rs.getInt(1); // for INTEGER database fields       String s = rs.getString(2) // for VARCHAR database fields (not VARCHAR2 !!)       double d = rs.getDouble(3) // for DECIMAL database fields              How are the corresponding assign statements for NUMBER, VARCHAR2 and DATE ?              Sven              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca