Tricky question

Results 1 to 2 of 2

Thread: Tricky question

  1. #1
    Join Date
    Dec 1969

    Default Tricky question

    Hello, <BR><BR>I have a query that looks like this today:<BR>SELECT brs_banners.*<BR>FROM brs_banners<BR>WHERE (BannerType = @Type) AND ((ShowTimes = NULL) OR<BR> (ShowTimes &#062; Shown)) AND (ClickTimes = NULL OR<BR> ClickTimes &#062; Clicked) AND ((GETDATE() BETWEEN <BR> StartDate AND EndDate) OR<BR> ((StartDate = NULL) AND (EndDate = NULL)))<BR><BR>Since i&#039;m writing here you can understand it dosen&#039;t work. Here is what i want:<BR><BR>If ClickTimes, ShowTimes, StartDay and EndDate is NULL, return record<BR>If ClickTimes is Higher(or equal) than Clicked then return record<BR>If ShowTimes is Higher(or equal) than Shown then return record<BR>If startDate and EndDate are null Or today is between them return record... <BR><BR>What am i doing wrong...

  2. #2
    Tim Snyder Guest

    Default RE: Tricky question

    okay <BR>IS NULL<BR>not <BR>= NULL

Posting Permissions

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