Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    1

    Unanswered: OSQL DELETE Using LIKE, with a cascading effect

    Edit: Sorry This is OSQL.

    What I use as my query is:
    Code:
    "DELETE FROM timerecord WHERE Actual_Time_In LIKE '11.12.2006%'"
    The row of Actual_Time_In is formatted with Date and time (MM.DD.YYYY HH:MMS) sometimes there are ten records and I'd rather not have to remove them from the table one at a time. However, even though I have a record that is '11.12.2006 22:43:00' my delete doesn't work osql states I have 0 rows affected.
    This is only MSDE so I don't have anyother way to open the table.

    Sometimes these records have other records that reference them. Is there anyway to do a cascading delete without it getting to complex?


    Thanks of all your help, I am just a tech support guy beating his head against a wall..
    Last edited by pcfascist; 11-16-06 at 02:52.

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    do not use like with datetime. use > < >= <=. to have cascading deletes you have to setup your forien key constraints to do so.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by pcfascist
    Edit: Sorry This is OSQL.
    I did have my nose up to the monitor first time I saw the thread muttering "is that a Q?".

    Title edited.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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