Get the latest!
You are here: Home / Tag Archives: plsql

Tag Archives: plsql

Commenting in PLSQL – Who Cares

Commenting PLSQL Best Practises

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 »

How To Tokenize Or Parse A String In PLSQL

tokenize_string

If you have worked with SQL and PL/SQL for a while, you have probably been in a situation where you have a string that is delimited with a character, and you want the chunks of the string by themselves… In this tutorial we are going to look at a few ways to do this. Read More »

Quick Tip: Slicing A Long PLSQL String Into Smaller Pieces

slicing_strings

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 Get Random Dates In Oracle PLSQL

random_date

Have you ever worked on a project in PL/SQL where you wanted to create random dates? And even worse, what if the random dates need to be in a given date range? I am working on a such project now, and in this little tutorial I will show you one way this can be done. Read More »

How To Disallow A Scheduled Procedure To Be Run on a Cloned Server

stop_sign

Have you ever wanted to stop a procedure from being run on a cloned server? In a typical software development environment, you will i.e. have a production database, a test database, and a development database. What usually happens is that once in a while the production database is cloned to become the new development database – to get more up-to-date ... Read More »

PLSQL Cursors – part 1: The Basics

plsql_cursors_basics

PL/SQL is an advanced programming language, and one of the many ways to retrieve data in PL/SQL is through the use of cursors. There are several ways cursors can be used in PL/SQL, and in a five-part series we are going to look at the basics of PL/SQL cursors, and then four different ways to use cursors in PL/SQL. Before ... Read More »

How To Convert Unix Timestamp To Date Format In PLSQL

unix_to_oracle_date

Some times you come into a situation where you are given a date in the Unix Timestamp format, and you want to convert it to Oracle date format to store it in your Oracle table. A sample of this can be that you are loading data from CA Service Desk (which is SQL Server based – using dates stored as ... Read More »

How To Get Elapsed Time in PLSQL

stopwatch

If you are familiar with with PLSQL you probably have wanted to find out, and show, how long time it takes to process something. Like with me i.e., I am responsible for calculating the points for many of my employer’s distributor contests. It is scheduled to automatically run every night at a certain time during the contest. At the end ... Read More »

McAfee Total Protetion 50% Off
Scroll To Top