Jump to content

Recommended Posts

Posted

I know I did this once but cannot find the fex.

I have a WHERE statement that should run every month EXCEPT for JULY. In July the WHERE is different. I seem to recall having some of code in the fex:

TABLE FILE xyz

.

.

.

BY period

.

.

.

-IF MONTH = July

Where xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

-GOTO CONTINUE

IF MONTH <> JUL THEN

Where bbbbbbbbbbbbbbbbbbbbbbbbbbb

-GOT TO CONTINUE

.

.

-CONTINUE

.

.

.

How do I evaluate the current Month and what is the syntax

Thanks!

Posted

Are you comparing against a date field

TABLE FILE something

...

WHERE Date_YYMD LT DTRUNC('&DATEYYMD',MONTH);

...

END

 

Which would remove all dates for current month, July-2021 if you dont have future dates in August-2021, etc.

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...