SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Select MAX Value from table

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Select MAX Value from table

[ Edited ]

I need to find the highest record in a table ("DATA_ARQUIVO" field).
I'm trying to use the Create Table without success.

1.jpg

 

 

2.jpg

 

3.jpg

 

Any ideas to help me?

Thanks.


Accepted Solutions
Solution
‎07-06-2016 08:21 AM
Super Contributor
Posts: 441

Re: Select MAX Value from table

Hi, I would use an Extract transform. Map the DATA_ARQUIVO column with an expression MAX(DATA_ARQUIVO).

 

The essence of the code would be:

 

%put %str(NOTE: Mapping columns ...);
proc sql;
   create table work.W36LRL as
      select
         (max(DATA_ARQUIVO)) as DATA_ARQUIVO length = 8
   from &SYSLAST
   ;
quit;

 

Extract Properties_2016-06-30_23-20-09.png

 

Hope this helps,

- Jan.

View solution in original post


All Replies
Solution
‎07-06-2016 08:21 AM
Super Contributor
Posts: 441

Re: Select MAX Value from table

Hi, I would use an Extract transform. Map the DATA_ARQUIVO column with an expression MAX(DATA_ARQUIVO).

 

The essence of the code would be:

 

%put %str(NOTE: Mapping columns ...);
proc sql;
   create table work.W36LRL as
      select
         (max(DATA_ARQUIVO)) as DATA_ARQUIVO length = 8
   from &SYSLAST
   ;
quit;

 

Extract Properties_2016-06-30_23-20-09.png

 

Hope this helps,

- Jan.

☑ This topic is solved.

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

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