In this article I will be discussing commenting in PLSQL, and if we really need to care about commenting our code or not. During my years as a PL/SQL developer, I have seen many types of comments, both good and bad. I will speak about some of the ways to comment that I have experienced. Read More »
Tag Archives: tips
Formatting SQL – Best Practices
Having worked with SQL for so many years, I have definitely made up my mind about formatting SQL. I am a strong-minded person, and I have my own opinions. Most of these opinions are based on experience, but some of them are..maybe…just traditions…sometimes driving colleagues nuts. Read More »
11 Ways to Increase Your Oracle Skills
Being totally fresh and new as any kind of developer can be pretty tough sometimes. Maybe you were just hired by a company and they promised you that they would teach you everything you need to know? Let me tell you something… The life in an IT department is very often a very hectic life, and things do not always turn out ... Read More »
How To Rank Records in Oracle SQL
A long time ago I put together a tutorial (How To Use Oracle Analytic Functions in Oracle SQL) on how to use some of the more common Oracle Analytic Functions. In this tutorial I am going to discuss how to rank records in Oracle using the RANK() and the DENSE_RANK() analytic functions. I chose to put this in a separate post, since it ... Read More »
Quick Tip: How To Pick Random Customers In Oracle
At my work I am responsible for generating data for 90% of our contests. Once in a while there are requests where they want to pick out. i.e. ten random people. This quick tip is showing you one way how to pick random customers in Oracle using SQL. Read More »
Quick Tip: Do Not Use TRUNC To Filter on a Date and Time Field
Doing a TRUNC on a date might seem as a perfect solution if you want to query records having a column with both a date and a time. But, as you will see in this little Quick Tip, it is not always that smart. Read More »
Quick Tip: Slicing A Long PLSQL String Into Smaller Pieces
In Oracle 11g, the maximum size for a VARCHAR2 field in a table is 4,000 bytes. In PL/SQL your VARCHAR2 variables can be defined as up to 32,767 bytes. So, what if you i.e. have a log table where you would want to put all the content of your PL/SQL variable? Read More »
How to Search Code Using USER_SOURCE and ALL_SOURCE In SQL
Many times in my career, working with Oracle, I have had to search through lots of code to figure out what actually fills data into i.e. the the table I am pulling data from in my report. To do this I have been using the two Oracle Data Dictionary views USER_SOURCE, and ALL_SOURCE. I use these (as well as others) ... Read More »
How To Use Oracle Analytic Functions in Oracle SQL
A while ago I wrote several similar articles on how to use the different Analytic functions in Oracle. I have now chosen to merge these articles into one useful article/document that you can print out or save to your computer for your own reference. In this tutorial I will try to explain to you how to use them, through practical ... Read More »
How to find first and last date of a month in SQL
Working with dates is fun. In this post we are going to show a method to easily find the first and last date of the current month, previous month, and next month. Knowledge about this will come in handy if you i.e. want to do a year-over-year sales analysis, or maybe you would like to take the current month’s sales ... Read More »
OracleTuts Oracle Training, Tutorials, and Videos from Beginner to Advanced
