On Thursday, May 2, 2013 6:18:40 PM UTC-6, Midana wrote:
>
> thanks Michael, but my column type is timestamp.
>
> *Midana Fernandes Sana*
> *"* *O filho sábio atende à instrução do pai; mas o escarnecedor não ouve
> a repreensão**."*
>
>
> 2013/5/2 Michael Moore <[email protected] <javascript:>>
>
>> SQL> describe mytab99
>> TABLE mytab99
>> Name Null? Type
>>
>> ----------------------------------------- --------
>> ----------------------------
>> MYDATE DATE
>>
>> SQL> insert into mytab99 (mydate) values (sysdate)
>> 1 row created.
>> SQL> commit
>> Commit complete.
>> SQL> select * from mytab99
>>
>> MYDATE
>> ---------
>> 02-MAY-13
>> 1 row selected.
>>
>>
>> On Thu, May 2, 2013 at 4:05 PM, Midana <[email protected] <javascript:>>wrote:
>>
>>> how can I insert sysdate.
>>>
>>> insert into trajetoria values ('Ir pra Faculdade',
>>>
>>> ListaPosicaoTempoEspaco_ty(*to_timestamp(sysdate,'DD-MON-RRRR HH:MI PM')
>>> *,
>>> SELECT REF(pg) FROM
>>> pontogeografico pg WHERE pg.latitude = '-3.728876' and longitude =
>>> '-38.521006'),
>>> SELECT REF(u) FROM usuario u WHERE u.NOME
>>> = 'Midana');
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Oracle PL/SQL" group.
>>> To post to this group, send email to [email protected]<javascript:>
>>> To unsubscribe from this group, send email to
>>> [email protected] <javascript:>
>>> For more options, visit this group at
>>> http://groups.google.com/group/Oracle-PLSQL?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Oracle PL/SQL" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected] <javascript:>.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Oracle PL/SQL" group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/Oracle-PLSQL?hl=en
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Oracle PL/SQL" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/oracle-plsql/3IXDcW7JlrE/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
There is no need for this:
(* to_timestamp(sysdate,'DD-MON-RRRR HH:MI PM')*
*
*
since there exists the systimstamp pseudo-column.
SQL> create table ts_test(
2 mydata varchar2(12),
3 my_timestmp timestamp
4 );
Table created.
SQL>
SQL> begin
2 for i in 1..1000 loop
3 insert into ts_test
4 values('SNORM'||i, systimestamp);
5 end loop;
6
7 commit;
8
9 end;
10 /
PL/SQL procedure successfully completed.
SQL>
SQL> select * from ts_test;
MYDATA MY_TIMESTMP
------------
---------------------------------------------------------------------------
SNORM1 03-MAY-13 07.55.21.674000 AM
SNORM2 03-MAY-13 07.55.21.674000 AM
SNORM3 03-MAY-13 07.55.21.674000 AM
SNORM4 03-MAY-13 07.55.21.674000 AM
SNORM5 03-MAY-13 07.55.21.674000 AM
SNORM6 03-MAY-13 07.55.21.674000 AM
SNORM7 03-MAY-13 07.55.21.674000 AM
SNORM8 03-MAY-13 07.55.21.674000 AM
SNORM9 03-MAY-13 07.55.21.674000 AM
SNORM10 03-MAY-13 07.55.21.674000 AM
SNORM11 03-MAY-13 07.55.21.674000 AM
MYDATA MY_TIMESTMP
------------
---------------------------------------------------------------------------
SNORM12 03-MAY-13 07.55.21.674000 AM
SNORM13 03-MAY-13 07.55.21.674000 AM
SNORM14 03-MAY-13 07.55.21.674000 AM
SNORM15 03-MAY-13 07.55.21.674000 AM
SNORM16 03-MAY-13 07.55.21.674000 AM
SNORM17 03-MAY-13 07.55.21.674000 AM
SNORM18 03-MAY-13 07.55.21.674000 AM
SNORM19 03-MAY-13 07.55.21.674000 AM
SNORM20 03-MAY-13 07.55.21.674000 AM
SNORM21 03-MAY-13 07.55.21.674000 AM
SNORM22 03-MAY-13 07.55.21.674000 AM
...
Please note how the insert was accomplished in the PL/SQL block which
populated the table.
David Fitzjarrell
--
--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
---
You received this message because you are subscribed to the Google Groups
"Oracle PL/SQL" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.