|
|
|
Data идущая в oracle
|
|||
|---|---|---|---|
|
#18+
Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Если из девелоперы процедуру вызываю, то параметры дат пишу как "03.06.2007 0:00:01" - jочень важнга каждая секунда... Вот... А когда пытаюсь передать его в Java Код: plaintext Т.е. без времени все отрабатывает, в вот с ним - ни как :( Как не играл, не выходит :( Ни кто не сталкивался ??? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.06.2007, 13:06:14 |
|
||
|
Data идущая в oracle
|
|||
|---|---|---|---|
|
#18+
java.sql.Date идет без секунд, по крайней мере в драйвере от Oracle. Используй java.sql.Timestamp, только лучше сперва создать его экземпляр с нужной датой/временем и передавать уже его через cs.setTimestamp(). Posted via ActualForum NNTP Server 1.4 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.06.2007, 13:33:21 |
|
||
|
Data идущая в oracle
|
|||
|---|---|---|---|
|
#18+
Да, но если же Код: plaintext ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.06.2007, 14:13:58 |
|
||
|
Data идущая в oracle
|
|||
|---|---|---|---|
|
#18+
crashc wrote: > Да, но если же > Код: plaintext > Почему это не отрабатывает то ??? Как не отрабатывает? Ругается или как-то иначе? Posted via ActualForum NNTP Server 1.4 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.06.2007, 14:22:07 |
|
||
|
Data идущая в oracle
|
|||
|---|---|---|---|
|
#18+
Может быть это поможет... Time and Date Literals Databases differ in the syntax they use for date, time, and timestamp literals. JDBC supports dates and times written only in a specific format. This section describes the formats you must use for date, time, and timestamp literals in SQL statements. Date Literals The JDBC drivers support date literals in SQL statements written in the format: {d 'yyyy-mm-dd'} Where yyyy-mm-dd represents the year, month, and day. For example: {d '1995-10-22'} The JDBC drivers will replace this escape clause with the equivalent Oracle representation: "22 OCT 1995". The following code snippet contains an example of using a date literal in a SQL statement. Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Time Literals The JDBC drivers support time literals in SQL statements written in the format: Embedded SQL92 Syntax A-8 Oracle Database JDBC Developer's Guide and Reference {t 'hh:mm:ss'} where, hh:mm:ss represents the hours, minutes, and seconds. For example: {t '05:10:45'} The JDBC drivers will replace this escape clause with the equivalent Oracle representation: "05:10:45". If the time is specified as: {t '14:20:50'} Then the equivalent Oracle representation would be "14:20:50", assuming the server is using a 24-hour clock. This code snippet contains an example of using a time literal in a SQL statement. Код: plaintext 1. Timestamp Literals The JDBC drivers support timestamp literals in SQL statements written in the format: {ts 'yyyy-mm-dd hh:mm:ss.f...'} where yyyy-mm-dd hh:mm:ss.f... represents the year, month, day, hours, minutes, and seconds. The fractional seconds portion (.f...) is optional and can be omitted. For example: {ts '1997-11-01 13:22:45'} represents, in Oracle format, NOV 01 1997 13:22:45. This code snippet contains an example of using a timestamp literal in a SQL statement. Код: plaintext 1. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.06.2007, 14:40:12 |
|
||
|
Data идущая в oracle
|
|||
|---|---|---|---|
|
#18+
Имею вот такую конструкцию... Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. Код: plaintext Код: plaintext Но в SQLDevelopere же и так и так отдает... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.06.2007, 14:41:07 |
|
||
|
Data идущая в oracle
|
|||
|---|---|---|---|
|
#18+
Посмотри параметр сессии NLS_DATE_FORMAT, в SQL Developer'е и в java. Если уж очень хочется, то можешь сделать примерно следующее, если 3-й и 4-й параметры функции get_allb.raffic() имеют тип DATE: Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.06.2007, 14:58:23 |
|
||
|
Data идущая в oracle
|
|||
|---|---|---|---|
|
#18+
Мда... Благодарю и снимаю шляпу! И не только за данную личную мну помощь! А и вобще... Спасибо ! Дадеюсь не в последний раз ;) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.06.2007, 15:06:32 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=34572159&tid=2145527]: |
0ms |
get settings: |
14ms |
get forum list: |
24ms |
check forum access: |
6ms |
check topic access: |
6ms |
track hit: |
85ms |
get topic data: |
20ms |
get forum data: |
5ms |
get page messages: |
84ms |
get tp. blocked users: |
2ms |
| others: | 345ms |
| total: | 591ms |

| 0 / 0 |
