Skip to content
Advertisement

SAS proc sql – is this the correct usage?

This works but wanted a health check as to if i have done this correct with proc sql connect to i.e do i need to have separate “select * from connection to’s”?

Thanks

Advertisement

Answer

Since you are pulling from the same database just push the join into the database. While you are at it assign names to the variables when you create them.

Since you are generating those counts from querying the same table (dataset) you can to it with a single query by using CASE instead of WHERE.

Although you might want to add the common conditions to the where clause to have it process fewer records.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement