Help using Base SAS procedures

Proc Sql Select clause query

Reply
Occasional Contributor
Posts: 13

Proc Sql Select clause query

Hi,

I want to create a variable incrementing with the value 1 in the Proc Sql Select clause Select statement....

Can anyone help me out in this...?
Super Contributor
Super Contributor
Posts: 365

Re: Proc Sql Select clause query

Posted in reply to alwaz_searching
Hello Alwaz,

You can use an undocumented SQL function MONOTONIC() but use it with caution:
[pre]
proc SQL;
create table class as
select MONOTONIC() as n,*
from SASHELP.CLASS
;quit;
[/pre]
Sincerely,
SPR
Occasional Contributor
Posts: 13

Re: Proc Sql Select clause query

Thank you SPR...!!!

It's working...!
Ask a Question
Discussion stats
  • 2 replies
  • 305 views
  • 0 likes
  • 2 in conversation