Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)

  • RE: Delete Rows from multiple tables

    Wow! That worked great. Thanks. I think I tried everyting except putting the Delete From & Where as Command1. I am going to run some tests on to see how...

  • RE: Delete Rows from multiple tables

    exec sp_MSforeachtable

    @command1 = 'DELETE FROM ? ',

    @whereand = '(TSTAMP < ''2007-01-01 00:00:00'')'

    Results the same:

    Server: Msg 170, Level 15, State 1, Line 1

    Line 1: Incorrect syntax near 'TSTAMP'.

  • RE: Delete Rows from multiple tables

    When executing query:

    exec sp_MSforeachtable

    @command1 = 'DELETE FROM',

    @whereand = '(TSTAMP < '2007-01-01 00:00:00')'

    I receive this error message:

    Server: Msg 170, Level 15, State 1, Line 3

    Line 3: Incorrect syntax near...

  • RE: Delete Rows from multiple tables

    Thanks for the help. I will be testing out different options on a backup server to see what works the best.

  • RE: Delete Rows from multiple tables

    So after looking around sp_MSforeachtable here is what I came up with:

    exec sp_MSforeachtable

    @command1 = 'DELETE FROM',

    @whereand = '(TSTAMP < '2007-01-01 00:00:00')'

  • RE: Delete Rows from multiple tables

    Sounds like I need to read about cursor / loops. I am also researching sys.sp_MSforeachtable.

Viewing 6 posts - 1 through 6 (of 6 total)