Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    7

    Unanswered: How do I use char(xxx) in a LIKE-statement

    I want to search several columns after a range of characters. How do I use the CHAR value in a LIKE-statment?

    declare @i int
    select @i = 0
    while @i between 1 and 10
    begin
    select * from tab1 where col1 like char(@i) ???
    (how do I use char here)
    end

  2. #2
    Join Date
    Feb 2004
    Posts
    6
    You can write CHAR(xxx) value to a vaiable and use that variable for LIKE comparison.

Posting Permissions

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