BookmarkSubscribeRSS Feed
Peter_C
Rhodochrosite | Level 12
thank you Ksharp
it is very interesting to hear how such culture spreads


> Yes.You are right . In China (Bei Jing) where I lived
> in, there are lots of Christmas Trees and Christmas
> Songs around me,and It is hard to see foreign friends
> now, maybe they have gone to their homeland to
> holiday.Unfortunately I have to work even though it
> is not too heavy,We will get Holidays until February
> 2,2011 that is Chinese Tradition New Year.

so, best wishes for your new year when it comes

>
> After look at your code, I found some problem in it.
> First,Macro variable &sqlobs is only generated after
> sql statement executed,that is to mean you need
> execute the same sql statement twice.

not in my SAS system![pre]proc sql noprint ; select name into :n1-:n999 from sashelp.class ;[/pre] fills &sqlobs with only one select statement! Have you tested your statement? (or mine?)
On my system &sqlobs does not exist until a "PROC SQL" statement executes. The value is filled by an sql select statement even if it would output no rows, like
select name into :names from sashelp.class where age > 16 ;

Can you demonstrate how or when PROC SQL fails to fill SQLOBS on any valid select statement ?



> Second.You label variable by using data step,

Where-ever I suggested this, I certainly should be reminded about the impact of an unneccessary pass through potentially large data!
Please could you point out or give me a hyperlink to where I provided this bad advice?


>
> Merry Christmas!
> Cheers.
> Ksharp

cheers from London, UK
peterC fixing bad grammar
Message was edited by: Peter.C
Ksharp
Super User
Dear Peter.
>not in my SAS system!

proc sql noprint ; select name into :n1-:n999 from sashelp.class ;

fills &sqlobs with only one select statement! Have you tested your statement? (or mine?)




Your code is right . It is my fault.I am too careless.Forgives me not careful to see your code.
I think I am too confidence and arrogant to check.Sorry.



>Please could you point out or give me a hyperlink to where I provided this bad advice?

I think you are very seasoned expert about SAS.


Cheers.
Ksharp Message was edited by: Ksharp

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 16 replies
  • 8069 views
  • 0 likes
  • 5 in conversation