User Profile

Collapse

Profile Sidebar

Collapse
ApocalypSys
ApocalypSys
Last Activity: Feb 27 '08, 08:22 AM
Joined: May 11 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ApocalypSys
    started a topic Substract hour into a function

    Substract hour into a function

    Hi, I need to substract a variable hour from a timestamp in PostgreSQL 8.2, I think I can use the following sentence

    Code:
    select '2007-05-14 12:36:47' + ('-5 hours'::reltime);
    I try that line in console and works fine for my purposes, but I'm having troubles turning the '-5' into a parameter for a plpgsql function.

    Do you have any recommendations about how this can be done?



    PS:...
    See more | Go to post

  • ApocalypSys
    replied to Retrieve number of rows in table
    Hi, you can use the following sentence

    Code:
    SELECT COUNT (*) FROM tablename;
    I hope this can help you.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...