DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old December 13th, 2005, 09:45 AM
jrthor2 jrthor2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 46 jrthor2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m
Reputation Power: 6
timestamps

I have a column that is of datatype timestamp. I need to set tha value of this column to current date + x number of minutes I pass in to it. I am trying the following, but get and error when I compile it:

NEXT_SEND_TIMESTAMP = (CURRENT TIMESTAMP + v_Minutes MINUTES)

Error:
During SQL processing it returned:
SQL0182N An expression with a datetime value or a labeled duration is not
valid. LINE NUMBER=95. SQLSTATE=42816

Could someone please help me with this.

Thanks!

Reply With Quote
  #2  
Old December 14th, 2005, 12:33 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Can you dump the contents of the sql statement in order to see what is actually being sent to the database?

Reply With Quote
  #3  
Old December 17th, 2005, 07:20 PM
fractalvibes fractalvibes is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Location: Waco, Texas
Posts: 632 fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 14 h 11 m 13 sec
Reputation Power: 22
Off the top of my head - not sure - here is something every DB2 programmer should have:

http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM

I have a printed copy in a binder at work - makes for an excellent quick reference to DB2 functions, etc.

My first stop when I cannot remember the exact function or syntax needed to accomplish a task.

fv
__________________
...because that is the way we have always done it. We've been doing it like that for 80 Years! (How do we change that mindset?)

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > timestamps


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway