Desktop productivity for business analysts and programmers

Using %sysfunc on a label

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

Using %sysfunc on a label

Hi,

I'm using proc sql to create a table where I want the label of column "ART_PRO" to be the current week number and changes every week when pull the report.

I'm using the following:

PROC SQL;

CREATE TABLE test_table AS

SELECT ART_PRO

FROM WORK.COM_VTA_SEM_ANT

RUN;

Is it possible?

Thanks


Accepted Solutions
Solution
‎06-21-2013 08:48 AM
Community Manager
Posts: 2,884

Re: Using %sysfunc on a label

Yes.  Something like:

PROC SQL;

CREATE TABLE test_table AS

SELECT ART_PRO label="%sysfunc(week(%sysfunc(today())))"

FROM WORK.COM_VTA_SEM_ANT

RUN;

View solution in original post


All Replies
Solution
‎06-21-2013 08:48 AM
Community Manager
Posts: 2,884

Re: Using %sysfunc on a label

Yes.  Something like:

PROC SQL;

CREATE TABLE test_table AS

SELECT ART_PRO label="%sysfunc(week(%sysfunc(today())))"

FROM WORK.COM_VTA_SEM_ANT

RUN;

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 174 views
  • 1 like
  • 2 in conversation