in

CodeSmith Community

Your Code. Your Way. Faster!

Using SqlFilterBuilder to find db columns with empty strings

Last post 02-16-2007 5:07 PM by mike123. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-16-2007 10:04 AM

    • RCouchman
    • Not Ranked
    • Joined on 02-15-2006
    • Posts 5
    • Points 175

    Using SqlFilterBuilder to find db columns with empty strings

    I need my sql query to exclude records that contain an empty string in the Jobtitle column, so I try

    query.AppendNotEquals(AdjusterColumn.Jobtitle,String.Empty)

    but all the Appendxxx methods first check

    if ( !String.IsNullOrEmpty(value) )

    so the where clause isn't modified.  Is there a better way to accomplish this?

    Thanks.

    Filed under:
    • Post Points: 35
  • 02-16-2007 5:07 PM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 723
    • Points 16,775

    Re: Using SqlFilterBuilder to find db columns with empty strings

    Looks like AppendNotEmpty and AppendEmpty methods need to be added to the library

     to be used like following: query.AppendNotEmpty(AdjusterColumn.Jobtitle)
    Mike Shatny
    -------------------------------------
    Member of the .netTiers team
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 5
Page 1 of 1 (2 items)
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems