If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Insert DB2 SQL statement for a table with a column having TIMESTAMP as datatype !!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-25-06, 20:01
satish_bagali satish_bagali is offline
Registered User
 
Join Date: Apr 2006
Posts: 1
Question Insert DB2 SQL statement for a table with a column having TIMESTAMP as datatype !!

Hi ,
this is Satish. I am new to DB2 and new to this group too. I have a very simple question. Please help me.

I have a table created with the command,

CRATE TABLE WID
( COL1 VARCHAR(30),
COL2 TIMESTAMP
)
IN SIEBELWW.WIDACCNT FOR SBCS DATA;


Now I want to insert a record into this table. Can anybody please write a SQL statement for this ? This will be a great help. Please help me. The ' TIMESTAMP ' is creating problems for me.

Thanks a lot in advance.
Satish
Reply With Quote
  #2 (permalink)  
Old 04-26-06, 02:25
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
timestap

insert into table tt (col1,col2) values ('aa','1988-12-25-17.12.30.000000') ;
current timestamp can also be used
insert into table tt (col1,col2) values ('aa',current timestamp) ;
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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