Jump to content

Can someone please help me to convert this SQL to Webfocus code? GETDATE() - COALESCE(tl.FUTURE_SHIP_DATE,GETDATE()) >= 0


Merin Joseph
Go to solution Solved by David Beagan ,

Recommended Posts

  • Solution

Looks like you are wanting to get FUTURE_SHIP_DATE values that are earlier than the current date-time as well as the FUTURE_SHIP_DATE values that are NULL. Assuming that FUTURE_SHIP_DATE is of data type HYYMDS

(FUTURE_SHIP_DATE LE '&DATEHYYMDS' OR FUTURE_SHIP_DATE IS MISSING)
Link to comment
Share on other sites

Slightly different version - sample based on wf_retail

TABLE FILE retail_samples/wf_retailBY HIGHEST wf_retail.WF_RETAIL_TIME_SALES.TIME_DATEWHERE WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY EQ 'Accessories'AND (wf_retail.WF_RETAIL_TIME_SALES.TIME_DATE LE DT_CURRENT_DATE() OR wf_retail.WF_RETAIL_TIME_SALES.TIME_DATE IS MISSING)END

If your field is data time - use DT_CURRENT_DATETIME()

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...