From: SMXBob on 16 Apr 2010 14:32 Thanks Paul I don't think I would have ever thought of that one. Good job! "Paul Shapiro" <paul(a)hideme.broadwayData.com> wrote in message news:eKWwIoY3KHA.4336(a)TK2MSFTNGP04.phx.gbl... > SELECT * FROM [MyTable] > WHERE ([DueDate] < @DueDateParm) Or (@DueDateParm Is Null) > > "SMXBob" <smxbob(a)seametrix.com> wrote in message > news:#PsWTZX3KHA.1660(a)TK2MSFTNGP04.phx.gbl... >> Please notice what I am trying to do here. >> >> If I set the DueDateParm to a date I get all the records less then that >> date (see my query). >> The result set does NOT include nulls which is how it is suppose to work. >> >> What I then want is the option to return all rows including nulls. >> The OR option would work but I am back to my initial problem how do I >> remove it when I want just my date selection. >> >> >> >> "SMXBob" <smxbob(a)seametrix.com> wrote in message >> news:%23w5bugS3KHA.4332(a)TK2MSFTNGP02.phx.gbl... >>>I have a slight problem resetting a date select parameter in that I can't >>>get the records with null dates. >>> For instance this select statement >>> >>> SelectCommand="SELECT * FROM [MyTable] WHERE ([DueDate] < @DueDateParm)" >>> >>> <asp:SessionParameter >>> Name="DueDateParm" >>> SessionField="DueDateParm" >>> DefaultValue="" >>> ConvertEmptyStringToNull="true" >>> DbType="DateTime" /> >>> >>> If I set DueDateParm to a date it works fine I get all of the recors >>> less than that date. But I can't figure out how to reset it so every >>> record comes back.Records with Null dates are not selected. >>> The only method I can find is Clear but it clears ALL parameters. I just >>> want to reset this one. > |