3 Replies Latest reply: Jan 7, 2013 4:00 PM by hagay hadad RSS

    where problem

    hagay hadad

      hi,

      i have a problem with where condition, i want to use WHERE only if some filed =1,

      but it's don't work...

      here the code:

       

      inner join (CostPrice2)
      load "מספר שורת הזמנה",
      "מלון שהייה",
      "תאריך שהייה לעלות",
      Rez_RoomNights,
      Index_RoomType_cost,
      Index_RoomSet_cost,
      CostPrice_ChackIn, 
      CostPrice_ChackOut, 
      CostPrice_Cur, 
      if([תאריך שהייה לעלות]>=CostPrice_ChackIn and [תאריך שהייה לעלות]<CostPrice_ChackOut,1,0)*CostPrice_cost as CostPrice_cost,
      CostPrice_IfRoom, 
      CostPrice_ifPeople
      resident CostPrice2
      where ([תאריך שהייה לעלות]>=CostPrice_ChackIn and [תאריך שהייה לעלות]<CostPrice_ChackOut) and
       (if(CostPrice_IfRoom=1,Index_RoomType_cost2=Index_RoomType_cost));