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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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