hi I have a. Data step thatcreates a column name of day of week mon tue wed thur...
i Have a table that will depend on whatever the column generates a filter for that
here is my syntax for the criteria for table
From Step1
where week contain Some=? .;
need help in how to make refer to output from week an make it a criteria ...
TThanks
So is the variable (column) named WEEK? And what does the column actually contain? Is it the text 'mon' or 'tue' like in your question? Is the case consistent?
Then your selection criteria would look like
where upcase(week) in ('MON','TUE')
or
where upcase(week) in ('WED','FRI')
Or do you in fact have multiple variables (columns) with names like MON, TUE, WED ? If so then what do they contain? Are they numbers or character strings.
Let's assume they are numbers with zero or missing meaning false and another value meaning true then your selection criteria looks like:
where MON or TUE ;
or
where WED or FRI ;
HI Tom
yes the data step will create the column "week" and depending on yesterday day it will populate Mon or Tue or Wed or Thu or Fri .... then my table will into my criteria a filter for that
from Step1
where schedule contain = ?
I Don't know how to refer to my output from the data step week example for today it would pull Tue
so I need contain to eq Tue and tomorrow it should refer Wed .....I need to be like a macro. Where there is no manual intervention... Thanks for help
Why do you need a WHERE clause if it is just going to load the data then report it?
Are you asking how to generate the string Wed if today is a Wednesday?
where WEEK = "%sysfunc(today(),downame3)"
Or if YESTERDAY was a Wednesday?
where WEEK = "%sysfunc(putn(%sysfunc(today())-1,downame3))"
hi Tom
i have a data step that creates the yesterday day of the week example today I would get Wed....the name of that column is week
i I have another table that is looking into a schedule that looks like this
SChedule
Mon Wed Thu
Tue Wed Fri Sat
WEd Fri
WEd thu Sat
tue thu fri
mon Tue. Sat
what I need is on the second table I need to refer what the output was from the date step. For example if the output was Wed
then on the 2nd table I want to pull only were there is refer toWed ...
second table
i able I will need
ffrom. Table1
where schedule =week (wed) this could Mon ,Tue,Wed Thu,Fri..... So I will do a search for contain for that date of week....
TThanks Tom I fig it out
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.