Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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));
Try this:
where ([תאריך שהייה לעלות]>=CostPrice_ChackIn and [תאריך שהייה לעלות]<CostPrice_ChackOut) and
((CostPrice_IfRoom=1 and Index_RoomType_cost2=Index_RoomType_cost) or (CostPrice_IfRoom<>1));
(if(CostPrice_IfRoom=1,Index_RoomType_cost2=Index_RoomType_cost));
pls check this if condition.
if(condition, true value, false value)
but u have writter two conditions. then u have to write multiple if
Try this:
where ([תאריך שהייה לעלות]>=CostPrice_ChackIn and [תאריך שהייה לעלות]<CostPrice_ChackOut) and
((CostPrice_IfRoom=1 and Index_RoomType_cost2=Index_RoomType_cost) or (CostPrice_IfRoom<>1));
thank you very much,
it's was good idea !