Write and run SAS programs in your web browser

SAS Studio Task - in clause for a where statement

Reply
Contributor
Posts: 54

SAS Studio Task - in clause for a where statement

Hi,

 

I'm building a task where I want to create a where clause based on a data and variable selection (I've re-used the Filter Data supplied task). I want to create an IN clause but there seems to be no way of doing it.

 

I can fill a DISTINCT object with the variable values but this only allows one value to be selected. A COMBOBOX is also out of the question as this is also a single selection object.

 

Has anyone managed to fill a SELECT object with the variable values? I've only managed to get it to add in the variable name when I want to get the list of distinct values from that variable name.

 

Anyone got any ideas?

 

Cheers,

Lawrence

Valued Guide
Posts: 593

Re: SAS Studio Task - in clause for a where statement

Posted in reply to LawrenceHW

I'm not sure that you can do this either unless @ChrisHemedinger or @OliviaWright know a way.

 

However you can do this already with the supplied Query Utility so you may not need a Custom task after all...

Contributor
Posts: 54

Re: SAS Studio Task - in clause for a where statement

Posted in reply to ChrisBrooks

Hi Chris,

 

Thanks for the reply. I'll have a look at the Query Utility but I actually need this as part of a larger custom task. So the selection of a where clause is one part of the whole custom task. Unless there's a way of calling existing tasks from within a custom task (analogous to a macro).

 

Cheers,

Lawrence

Highlighted
SAS Employee
Posts: 9

Re: SAS Studio Task - in clause for a where statement

Posted in reply to LawrenceHW

The feature that you are looking for in an object to construct a custom task is currently not available in SAS Studio. We will consider adding this feature in a future release. Thank you for your feedback. 

 

With regarding to your other question, you cannot call an existing task from a custom task. However, you can run an existing task and a custom task together using a Process Flow in SAS Studio.

Ask a Question
Discussion stats
  • 3 replies
  • 202 views
  • 5 likes
  • 3 in conversation