Professional Web Applications Themes

Delete - Microsoft SQL / MS SQL Server

Try: Ex: create table #t(val varchar(500)) insert into #t values ('62308636_') update #t set val = left(val, len(val) - 1) select * from #t -- -Vishal "sardinka" <com> wrote in message news:0b3401c35052$0b449450$gbl... ...

  1. #1

    Default Re: Delete

    Try:
    Ex:
    create table #t(val varchar(500))
    insert into #t values ('62308636_')
    update #t set val = left(val, len(val) - 1)
    select * from #t

    --
    -Vishal

    "sardinka" <com> wrote in message
    news:0b3401c35052$0b449450$gbl... 


    Vishal Guest

  2. #2

    Default Re: Delete

    UPDATE Sometable SET col = REPLACE(col,'_','')

    --
    David Portas
    ------------
    Please reply only to the newsgroup
    --

    "sardinka" <com> wrote in message
    news:0b3401c35052$0b449450$gbl... 


    David Guest

  3. #3

    Default Re: Delete

    sardinka,
     


    create table t1 (c1 varchar(10))
    insert t1 values ('62308636_')
    insert t1 values ('45608636')

    update t1 set c1 = replace(c1, '_', '')
    where patindex ('%[^0-9]', c1) > 0

    select * from t1
    go
    drop table t1


    Linda

    lindawie Guest

Similar Threads

  1. Delete PDF
    By Roy Reed in forum Macromedia Contribute General Discussion
    Replies: 4
    Last Post: May 1st, 11:48 AM
  2. Delete form - Post data to a table and delete uponsubmit.
    By FusionRed in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: July 28th, 01:27 PM
  3. Why won't this delete???
    By weswhite7 in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: July 8th, 03:09 PM
  4. Delete button to delete 3D model
    By mindylim in forum Macromedia Director 3D
    Replies: 1
    Last Post: February 18th, 10:47 AM
  5. Delete key doesn't delete when datagrid is bound to a disconnected table
    By Fred Zolar in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: April 1st, 07:47 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139