![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Wed, Sep 2 2009 10:10 AM | Permanent Link |
"Carlos" | Hi
I have two table in Master-Detail; both with date_order column I need to delete all record from both table where the column date_order is older than today - 60gg AND the column date_shipping in Master is no empty. Thanks Carlos |
Wed, Sep 2 2009 10:12 AM | Permanent Link |
"Carlos" | "Carlos" <carlos@noemail.com> ha scritto nel messaggio news:09FB2DDF-BA9E-43E6-A9FE-CE9E195D5643@news.elevatesoft.com... > Hi > I have two table in Master-Detail; both with date_order column > > I need to delete all record from both table where the column date_order is > older than today - 60gg AND > the column date_shipping in Master is no empty. > > Thanks > > Carlos > I forget..... both table contain column ORDER_N |
Wed, Sep 2 2009 12:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Carlos,
<< I have two table in Master-Detail; both with date_order column I need to delete all record from both table where the column date_order is older than today - 60gg AND the column date_shipping in Master is no empty. >> Use something like this script: START TRANSACTION; DELETE FROM Detail INNER JOIN Master ON Detail.order_n=Master.order_n WHERE Detail.date_order < CURRENT_DATE() AND Master.date_shipping IS NOT NULL; DELETE FROM Master WHERE date_order < CURRENT_DATE() AND date_shipping IS NOT NULL; COMMIT; -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Sep 3 2009 3:24 AM | Permanent Link |
"Carlos" | Great !
Thank you very much !!! Carlos |
This web page was last updated on Wednesday, July 2, 2025 at 06:46 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |