Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Posts
    30

    Exclamation Unanswered: Isnumeric in SQL SERVER 7

    Hello,

    I would like to perform a delete statement on one of my tables.

    I have a code column that has data in the form 011-234-12
    and at some point in this column the data is like R0 or D1

    I want to delete the rows where the code data is R0 or D1, E3, etc...

    I would like to know how to create an SQL Command for Sql Server 7 that would delete from Soumission_detail where:

    first left char is not Numeric in the code column.

    Thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    DELETE FROM Soumission_detail
    WHERE IsNumeric(LEFT(code,1)) = 0
    “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
    Oct 2003
    Posts
    357
    Why is left necessary?

    DELETE FROM Soumission_detail
    WHERE IsNumeric(code) = 0
    Madhivanan

    Failing to plan is Planning to fail

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Quote Originally Posted by mrhyman
    Hello,
    first left char is not Numeric in the code column.
    Madhivanan,
    This was the requirement.
    “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.

  5. #5
    Join Date
    Oct 2003
    Posts
    30
    Thanks Thrasymachus.

    That was exactly what I was looking for. Indeed the Left was necessary.

    Cool.

    Mark

Posting Permissions

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