0

I know this statement are Conditions but can anyone explain how is it work and what is mean exactly ??

what this <> mean

" AND (FromDate is null or FromDate >= ?) "
" AND (Status is null or Status <> 'Canceled')"

and those are almost the same what the different between them ?

(min(FromDate) >= ? AND max(ToDate) <= ? ) OR "
" (min(FromDate) >= ? AND max(ToDate) <= ? ) "
Marc B
  • 356,200
  • 43
  • 426
  • 500
Soso143
  • 11
  • 2
  • 1
    `<>` is "greater than AND less than", a.k.a "not equal to". note sure what you mean with the second. The two condition sets are identical. `p OR p` is pointless duplication. – Marc B Nov 19 '14 at 21:08
  • `<>` is old-school for `!=` and still enjoys life in Excel spreadsheets which inherited it from [Lotus 1-2-3](http://en.wikipedia.org/wiki/Lotus_1-2-3). – tadman Nov 19 '14 at 21:11

2 Answers2

0

<> stands for != (does not equal to). It's pretty old school - most newer languages do not use that.

Also, ? (a question mark) represents a parameter in a query. More info here.

Community
  • 1
  • 1
C0D3LIC1OU5
  • 8,600
  • 2
  • 37
  • 47
  • And Excel. And Basic (including VB). And Pascal (including Delphi). And probably others too :-) – psmears Nov 19 '14 at 21:20
0

<> is SQl's version of does not equal whereas <= is less than or equal to and >= is greater than or equal to. So in answer to your question, the from date has to be equal too the set date or greater than it and the status does not equal cancelled

DrRoach
  • 1,320
  • 9
  • 16