<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Getting DATEADD syntax error in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455035#M2678490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jason...once again you've come to my rescue.  I didn't think to add 'openedge' to the google search for Progress date functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a helpful link.  I haven't yet found the answer to my DATEADD delima, but it is one to add to the 'favorites' list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://www.progress.com/progress/products/documentation/docs/dmsrf/dmsrf.pdf]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marlene &lt;SPAN __jive_emoticon_name="grin"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Nov 2010 18:07:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-11-19T18:07:31Z</dc:date>
    <item>
      <title>Getting DATEADD syntax error</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaq-p/7455031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ya'll.  I am writing a SQL query and I keep getting a syntax error with the DATEADD function.  Can anyone help me to figure out the error?  I have looked it up and I believe the syntax to be correct.  Query is below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT 

c.div, 
c.scm_active,
c.scm_cntrgrp, 
c.scm_ctr_dt, 
c.scm_ctr_no, 
c.scm_end_dt, 
c.scm_name, 
c.scm_renew_no,
s.seh_ctr_no,
s.seh_hrs insp_hrs,
s.seh_ins_cd,
s.seh_month,
s.seh_renew_no,
DATEADD("m",s.seh_month-1,c.scm_ctr_dt) insp_mo

FROM

Sm_cntrt c

LEFT JOIN
sm_cmeihr s on c.scm_ctr_no = s.seh_ctr_no and
               c.scm_renew_no = s.seh_renew_no



WHERE
c.scm_active = 'a' and
c.scm_ctr_no = 'g0420602'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error is "Syntax error in SQL statement at or about ") insp_mo FROM sm_cntrt c LEFT"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, I sure do appreciate the help!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marlene&lt;/P&gt;&lt;P&gt;Crystal Reports XI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marlene Human on Nov 18, 2010 12:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 17:52:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaq-p/7455031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-18T17:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting DATEADD syntax error</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455032#M2678487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The database uses different syntax DateAdd syntax than CR. Try it this way...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATEADD(mm,s.seh_month-1,c.scm_ctr_dt) insp_mo
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 18:58:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455032#M2678487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-18T18:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting DATEADD syntax error</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455033#M2678488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion Jason.  However I am getting the same syntax error.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Failed to retrieve data from the database.&lt;/P&gt;&lt;P&gt;Details: HY000:[DataDirect][ODBC Progress OpenEdge Wire Protocol Driver][OPENEDGE]Syntax error in SQL statement at or about ") as insp_mo, s.seh_renew_no FROM "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have exhausted myself looking for SQL syntax for date functions on Progress...why is it so difficult to find this information?  I thought I had lucked up on a Progress SQL Guide and Reference, but it does not include sql syntax information for date functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Almost all of the suggestions that are given to me on this forum are helpful and probably useful if I can get the syntax correct for Progress.  I believe this to be the problem.&lt;/P&gt;&lt;P&gt;Do you happen to know the correct syntax that I can use for DATEADD or do you know of any reference websites?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your help!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 17:44:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455033#M2678488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-19T17:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Getting DATEADD syntax error</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455034#M2678489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have no idea about Progress OpenEdge. Try Googleing "progress openedge date functions". I'm sure you'll find what you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 17:54:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455034#M2678489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-19T17:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting DATEADD syntax error</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455035#M2678490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jason...once again you've come to my rescue.  I didn't think to add 'openedge' to the google search for Progress date functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a helpful link.  I haven't yet found the answer to my DATEADD delima, but it is one to add to the 'favorites' list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://www.progress.com/progress/products/documentation/docs/dmsrf/dmsrf.pdf]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marlene &lt;SPAN __jive_emoticon_name="grin"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 18:07:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455035#M2678490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-19T18:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting DATEADD syntax error</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455036#M2678491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correction...I DID find the answer to my DATEADD delima!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADD_MONTHS ( date_expression , integer_expression )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e.:  ADD_MONTHS(c.scm_ctr_dt,s.seh_month-1) as insp_mo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Jason, you're awesome!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 18:17:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-dateadd-syntax-error/qaa-p/7455036#M2678491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-19T18:17:17Z</dc:date>
    </item>
  </channel>
</rss>

