DATA Step, Macro, Functions and more

Conversion to PROC SQL Programming

Reply
Contributor
Posts: 21

Conversion to PROC SQL Programming

We need to convert the program into proc sql programming. Could someone assist us on this?

 

The data will contain country holidays. From the data source file given, fulfill the following requirements:

 

  1. Create database, tables (staging tables and audit tables)
  2. Define indexes, constraints, triggers, functions, procedures and other as needed. (I’m not sure if this is applicable to SAS?)
  3. Only load the current year holidays.
  4. Aside from the holidays from the file, all the weekends (Saturdays and Sundays) will be entered in the result table as a weekend holiday, which can be identified differently from the holiday picked up from the file.
  5. Design the tables thinking that there will be several country files.

 

 

The proc sql script for the database design and the data itself should be able to address the following questions:

 

  1. How many holidays are there for each country?
  2. How many weekend holidays are there, at the same time falling as a declared holiday?
  3. When was a certain record added, updated or deleted?
  4. If all dates are loaded, what are repeating holidays?
Valued Guide
Posts: 557

Re: Conversion to PROC SQL Programming

What have you tried so far?

Contributor
Posts: 21

Re: Conversion to PROC SQL Programming

So far, I just imported the source file in sas and filtered dates w/ year 2018. No index, etc. were made. Adding weekend tables and designing tables for multiple countries haven't been done yet
Respected Advisor
Posts: 2,981

Re: Conversion to PROC SQL Programming

[ Edited ]

@iSAS wrote:

We need to convert the program into proc sql programming. Could someone assist us on this?


Sure, you do the work, and if you get stuck, we'll be happy to assist. 

 

As implied by @andreas_lds, show us your code and we can help.

--
Paige Miller
Super User
Super User
Posts: 9,599

Re: Conversion to PROC SQL Programming

"We need to convert the program" - what program?

 

1 & 2 sound like database activities, not a SAS way of thinking.

 

For SQL a good reference:

https://www.w3schools.com/sql/

 

 

Ask a Question
Discussion stats
  • 4 replies
  • 66 views
  • 0 likes
  • 4 in conversation