Advertisement

09.25.2007 at 10:03AM PDT, ID: 22851556
[x]
Attachment Details

Need to convert/support MS SQL DATEADD function

Asked by Thirt in PostgreSQL Database

Tags: dateadd, sql

I'm using the following MS SQL select query that I need to duplicate in Postgres.
SelectCommand="SELECT Dat_Indexno, Emp_Name, Dat_Type, Dat_Resource, Dat_From, Dat_To, Dat_Note FROM Dato1 WHERE (Dat_Type = @ddtype) AND (Dat_From < DATEADD(DAY,1,@calendar3) AND Dat_To >= @calendar3) ORDER BY Emp_Name, Dat_From"

I've been playing with using the Timestamp Interval options but not getting the sytax right...
SelectCommand="SELECT dat_indexno, dat_empname, dat_type, dat_resource, dat_from, dat_to, dat_note FROM plus.tbl_waldo WHERE (dat_type = :param1) AND (dat_from < Timestamp :param2 + Interval '1 day' ) AND (dat_to >= :param2)"Start Free Trial
 
Loading Advertisement...
 
[+][-]09.25.2007 at 10:18AM PDT, ID: 19957381

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.25.2007 at 02:50PM PDT, ID: 19959359

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PostgreSQL Database
Tags: dateadd, sql
Sign Up Now!
Solution Provided By: earthman2
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09.25.2007 at 03:27PM PDT, ID: 19959548

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.25.2007 at 03:35PM PDT, ID: 19959580

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2007 at 04:27PM PDT, ID: 19959766

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2007 at 06:17AM PDT, ID: 19962735

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.27.2007 at 07:20AM PDT, ID: 19971365

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.29.2007 at 06:38AM PDT, ID: 19983874

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.29.2007 at 06:43AM PDT, ID: 19983888

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.29.2007 at 06:54AM PDT, ID: 19983925

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628