how know which recors have right blanks.

  • hi,

    Somebody know who know which records have righ blanks, a try whit this

    WHERE substring (xxx,len(xxx)-1,1) = ' '

    but not works.

  • Can you explain about why you need to know? Because comparing strings for trailing blanks is a little complicated, and it would help to answer your question if we knew the final outcome you want to have...

  • I have a table and i need to delete the blanks in records like this

    serialnumber = 'SGS04437PA         '

    but I dont want to update all the records, is possible to know what records have rigth blanks

    thanks

  • This is stored in a varchar column, I guess? And you don't want to just trim all of them.

    This is a little hacky, but you could

    select column

    from yourtable

    where len(item + '^') > len(item) + 1

    ('^' is just some placeholder character)

  • Thanks a lot Merrill is just that i need.

    Is working fine.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply