Tutor profile: Margaret W.
Subject: SQL Programming
What is the best / most efficient way to build or modify SQL?
Follow these steps to build new SQL or modify existing SQL successfully: 1) Write out what it is you want the SQL or the change to accomplish 2) If you have a large source data set, limit your test basis so you can test changes quickly 3) If it is a change to an existing SQL, run the existing SQL (with limitations if you added any) and store the results for comparison 4) Build the SQL gradually adding to it piece by piece and testing to the prior run to make sure your results match or changes were anticipated comparing back to your original purpose 5) As you add pieces compare performance to make sure your results were what were expected 6) As you add pieces, add documentation to explain who made the change, what it was, and why it was done 7) If you limited your test dataset, remove the limitations back to a normal run level and test to make sure the query will still run These steps enable you to avoid having made many changes and being unable to figure out at the end, why your results are unexpected or why your query will not run. While it seems like more steps, it is actually faster than building the whole query or all your changes at once.
What is the number one way to make a maintainable SAS program?
Documentation, documentation, documentation. Make sure you document your SAS programs in the SAS program. 1) name datasets and variables with names that really match what they are or they do (if you inherited the variable from another source and did not change it, keep the source name, if you change it at all, change the name) 2) put comments in line in the program between /* */ to explain a) what each steps does b) and why each complex variable is coded the way it is 3) put comments at the top about who programmed the piece of code and when and its purpose 4) put comments at the top which show what changes were made, by who, and why 5) put comments in line highlight which changes were made, by who, and why
What is the best way to answer word problems?
Word problems challenge many students, but with a careful well thought out process you can be very successful with work problems. 1. Read the problem through quickly to get a general sense of the question. 2. Identify what you are trying to solve for - for example area of a rectangle 3. Write down the general formula you believe will solve this for example height times width = area of a rectangle 4. Identify in the word problem the values you need - for example height was listed as 2 feet and width was listed as 4 feet 5. Write down the formula replacing the values with those you identified in step 4 and solve - for example 2' x 4' = 8 sq ft 6. Always double-check your arithmetic to ensure you didn't make an error 7. Review the problem compared to this formula to verify you have answered the question correctly using the correct values This may seem like quite a few steps, but if you follow them logically they will soon become second nature and flow very quickly. The last two steps will help you avoid turning in results that are not correct.
needs and Margaret will reply soon.