Results 1 to 2 of 2

Thread: Help.

  1. #1
    Join Date
    Dec 1969

    Default Help.

    I have a text field in an MSSQL7 db. I want to pull all records where this text field is "blank" but the problem is they have put White-space in many of the records in this field.<BR><BR>So, my select * from table where txt_field="" OR IsNull txt_field<BR><BR>doesn&#039t retrieve them all. How can I do a Trim on the field to do the select?

  2. #2
    J Guest

    Default RE: Help.

    Try this...<BR>SELECT * FROM TableName WHERE LTRIM(RTRIM(txt_field)) = &#039&#039 OR ISNULL(txt_field)

Posting Permissions

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