1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to compare dates in a sql script to progress database?

Discussão em 'StackOverflow' iniciado por fdantas, Junho 3, 2019.

  1. fdantas

    fdantas Administrator Moderador

    We have a field in our progress database which is DATETIME-TZ so an example of the data is "23/05/2019 12:11:16.099" - I'm need some help to compare dates in this field with an SQL select statement

    In progress procedure editor, I can compare dates easily, for example

    select date(bond-no) from accadd where date(bond-no) <= Today

    This works perfectly, but i need to get this info via sql for a web page and just get an error, even breaking the field down as a substring and making the date back up doesn't seem to work

    SELECT date(""bond-no"") FROM accadd WHERE date(""bond-no"") <= Date()

    Have tried variations on the above and this too...

    DATE(SUBSTRING(""bond-no"",4,2),SUBSTRING(""bond-no"",1,2),SUBSTRING(""bond-no"",7,4))

    This should return just dates earlier than today, but just get the old syntax incorrect message, so i'm missing something somewhere

    [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Syntax error in SQL statement at or about ") FROM accadd WHERE" (10713)

    Continue reading...

Compartilhe esta Página