Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003

    Unanswered: Need help with an UPDATE QUERY

    Version: Corel Paradox 8

    Personal Background: I have a few years of experience programming on client-side applications and SQL DBs, however I am new to Corel Paradox and I need help.


    I am trying to enhance a script file that is part of an existing application. I need to update one table based upon data in another table. In particular, I need to update an Alpha field in a table with the string equivalent of a date field in another table. The goal is to have the date value stored as a string in YYYYMMDD format.

    Below I have provided a snippet of the code. My quess is that format() is not accessible in a query.

    Thank you in advance,

    Sample Code:

    qry query

    qry = query

    Table1.db | T1Col1 | T1Col2 |
    | _join1 | _T1Col2 |

    Table2.db | T2Col1 | T2Col2 |
    | _join1 | .., changeto format("DY3M2D2O(%y%m%d)", _T1Col2) |



    Table: Table1.db
    Field: T1Col1
    Datatype: Alpha

    Field: T1Col2
    Datatype: Date

    Table: Table2.db
    Field: T2Col1
    Datatype: Alpha

    Field: T2Col2
    Datatype: Alpha

  2. #2
    Join Date
    Aug 2003
    Bologna - Italy
    You can do it by two queries:

    With the first one you translate the date to three alpha fields using the Year() Month() Day() functions, then use another query to bring them together in one string, or even do it in one pass...
    The only failure is not trying to do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts