|
| |
|
|
xgd
Posts: 59 Joined: 5/1/2007 Status: offline
|
DRW results with an exception - 6/8/2007 13:24:04
I have the following query:SELECT IM1_InventoryMasterfile.ItemNumber, IM1_InventoryMasterfile.ItemDescription, IM_90_UDF_IM_Masterfile.ML_UDF_IMH_MB_DSTRC+IM_90_UDF_IM_Masterfile.ML_UDF_IMH_MB_FRGT+IM_90_UDF_IM_Masterfile.ML_UDF_IMH_MB_HNDLGFEE+IM_90_UDF_IM_Masterfile.ML_UDF_IMH_IN_BOUND_FRT+IM_90_UDF_IM_Masterfile.ML_UDF_IMH_MB_POSTAGE+IM1_InventoryMasterfile.StdCost AS Expr1, IM_90_UDF_IM_Masterfile.ML_UDF_IMH_MB_DSTRC+IM_90_UDF_IM_Masterfile.ML_UDF_IMH_MB_HNDLGFEE+IM_90_UDF_IM_Masterfile.ML_UDF_IMH_IN_BOUND_FRT+IM_90_UDF_IM_Masterfile.ML_UDF_IMH_MB_POSTAGE+IM1_InventoryMasterfile.StdCost AS Expr2 FROM IM_90_UDF_IM_Masterfile INNER JOIN IM1_InventoryMasterfile ON IM_90_UDF_IM_Masterfile.ItemNumber = IM1_InventoryMasterfile.ItemNumber WHERE (((IM_90_UDF_IM_Masterfile.CB_UDF_IMH_CORE_ITEM)='y')) ORDER BY IM1_InventoryMasterfile.ProductLine DESC; With the following:<%=FP_FieldVal(fp_rs,"ItemNumber")%>
<%=FP_FieldVal(fp_rs,"ItemDescription")%>
<%=formatcurrency(FP_FieldVal(fp_rs,"Expr1"),2)%>
<%=formatcurrency(FP_FieldVal(fp_rs,"Expr2"),2)%>
Which works fine. What I need help with is if IM_90_UDF_IM_Masterfile.ML_UDF_IMH_MB_FRGT (Inside the query of Expr1) is 0 then return FP_FieldVal as "Not Available" if it greater then 0 then return the query result for Expr1 Any help would be greatly appreciated, Thanks.
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: DRW results with an exception - 6/8/2007 13:45:12
quote:
<%=formatcurrency(FP_FieldVal(fp_rs,"Expr1"),2)%> How 'bout right there? <%IF FP_FieldVal(fp_rs,"Expr1") <> 0 THEN response.write(formatcurrency(FP_FieldVal(fp_rs,"Expr1"),2)) ELSE response.write("Not Available") END IF %> That help any?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
xgd
Posts: 59 Joined: 5/1/2007 Status: offline
|
RE: DRW results with an exception - 6/8/2007 14:06:27
Actually, I was looking for if just ML_UDF_IMH_MB_FRGT was 0, not Expr1. But you put me on the right track and this works:<%IF FP_FieldVal(fp_rs,"ML_UDF_IMH_MB_FRGT") <> 0 THEN
response.write(formatcurrency(FP_FieldVal(fp_rs,"Expr1"),2))
ELSE
response.write("Not Available")
END IF Thank you!!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|