Feed aggregator

IntelliJ IDEA 14.1.4 adds Spring Initializr

Pas Apicella - Fri, 2015-08-14 21:57
Just upgraded to to Intellij IDEA 14.1.4 and found that the Spring Initializr web page for quickly creating spring boot applications has been added to the New Project dialog. The web site I normally drive new spring boot applications from as follows, is now part of IntelliJ IDEA which is great.

http://start.spring.io/

Some screen shots of this.





Categories: Fusion Middleware

Limit length of listagg

Mike Moore - Fri, 2015-08-14 12:23
SQL> select student_name, course_id from studentx order by student_name

STUDENT_NAME COURSE_ID
------------ ---------
Chris Jones  A102     
Chris Jones  C102     
Chris Jones  C102     
Chris Jones  A102     
Chris Jones  A103     
Chris Jones  A103     
Joe Rogers   B103     
Joe Rogers   A222     
Joe Rogers   A222     
Kathy Smith  B102     
Kathy Smith  A102     
Kathy Smith  A103     
Kathy Smith  B102     
Kathy Smith  A103     
Kathy Smith  A102     
Mark Robert  B103     

16 rows selected.
SQL> WITH x AS
        (SELECT student_name,
                course_id,
                ROW_NUMBER () OVER (PARTITION BY student_name ORDER BY 1) AS grouprownum
           FROM studentx)
  SELECT student_name,
         LISTAGG (CASE WHEN grouprownum < 5 THEN course_id ELSE NULL END, ',')
            WITHIN GROUP (ORDER BY student_name)
            courses
    FROM x
GROUP BY student_name

STUDENT_NAME
------------
COURSES                                                                         
--------------------------------------------------------------------------------
Chris Jones 
A102,A102,C102,C102                                                             
                                                                                
Joe Rogers  
A222,A222,B103                                                                  
                                                                                
Kathy Smith 
A102,A103,B102,B102                                                             
                                                                                
Mark Robert 
B103                                                                            
                                                                                

4 rows selected.

OAM PS3 State-of-the-art

Frank van Bortel - Fri, 2015-08-14 07:25
An attempt to run OAM 11G Release 2 PS3 on Oracle Linux 6.7, WLS 12C, RDBMS 12C. Install Linux Pretty straightforward. Used Oracle 6.7, as 7 is not certified. Create a 200MB /boot, and an LVM for /, both ext4. Install just the server. Deselect *all* options, just X system and X legacy support (the OUI needs it). Some 566 packages will get installed. Make sure it boots, and the network starts. Frankhttp://www.blogger.com/profile/07830428804236732019noreply@blogger.com0

WebLogic Server 12.1.3 Developer Zip - Update 3 Posted

Steve Button - Thu, 2015-08-13 18:48
An update has just been posted on OTN for the WebLogic Server 12.1.3 Developer Zip distribution.

WebLogic Server 12.1.3 Developer Zip Update 3 is built with the fixes from the WebLogic Server 12.1.3.0.4 Patch Set Update, providing developers with access to the latest set of fixes available in the corresponding production release.

See the download page for access to the update:

http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html

http://download.oracle.com/otn/nt/middleware/12c/wls/1213/wls1213_dev_update3.zip

The Update 3 README provides details of what has been included:

http://download.oracle.com/otn/nt/middleware/12c/wls/1213/README_WIN_UP3.txt


Oracle Priority Support Infogram for 13-AUG-2015

Oracle Infogram - Thu, 2015-08-13 11:00

RDBMS


Exalogic


Data Warehousing

System Statistics About DOP Downgrades, from The Data Warehouse Insider.

Solaris


Stateful Packet Inspection, from the Solaris Firewall blog.

Authentication


RDBMS Optimizer


Java

Clash Of Slashes ( / versus \ ), from Brewing tests with CAFE BABE.

Two good postings from The Java Source:



Hyperion

Several patch set announcements from Business Analytics - Proactive Support:





EBS

From the Oracle E-Business Suite Support blog:








From the Oracle E-Business Suite Technology blog:




How To Use The SQL Developer Export Connections With Passwords Function

Complete IT Professional - Thu, 2015-08-13 06:00

SQL Developer Export ConnectionsOracle’s SQL Developer tool lets you export a list of connections that you have created. This is great for saving time for your team. Learn how you can do that in this article.

Why Export Connections?

First of all, why would you want to export your connections?

There are a few reasons I can think of.

  1. Keep a separate file that contains your connections in case your computer crashes
  2. Save time setting up your computer if you get a new one
  3. Sharing common connections with the rest of the team so they can easily import and use the same connections

Let’s take a look at how to export connections in SQL Developer.

 

SQL Developer Export Connections Process

I’m going to assume you have at least one connection created in SQL Developer.

If you don’t you can read my guide or watch my video on how to set up a connection in SQL Developer.

In the image here, I have three.

connection 01

Now, to find the SQL Developer Export Connections menu option, right click on the Connections item in the tree, and select Export Connections…

connection 02

The Export Connections wizard will appear.

connections 03

Select the connections you want to export by clicking in the checkbox next to each item. You can select all items by clicking on the top-level Connections item, which is what I have done.

Then, click Next.

You’ll then be asked for an output file.

connections 04

You can enter the full path name for the file (location and filename), or click on Browse.

connections 05

Find the location where you want to save your connections file, and enter a filename. Connections are saved as an XML file, and I’ll show you an example later in this article.

Click Save.

Now, click Next.

You’ll be asked if you want to encrypt passwords or remove passwords.

connections 06

This is an important step, as you don’t want passwords in free-text fields in your exported file. You have two options

  • Encrypt all passwords with a key. You enter an encryption key to use, which you’ll need to enter again in the Verify Key box.
  • Remove all passwords from the exported connections. This removes the passwords, which means you’ll need to re-enter them when you go to use them.
I personally prefer the encryption option, as it saves time. If you’re OK with this, select this option. Enter a key in both boxes and click Next.

The Summary is shown. Click Finish.

connections 07

Your connections file is created, which is an XML file listing all of your connections.

connections 08

So, that’s how you use the SQL Developer Export Connections function.

Lastly, if you enjoy the information and career advice I’ve been providing, sign up to my newsletter below to stay up-to-date on my articles. You’ll also receive a fantastic bonus. Thanks!

Categories: Development

ODTUG APEX Gaming Competition 2015

Joel Kallman - Thu, 2015-08-13 03:11
If you're not aware, there is an APEX Gaming Competition which is already underway, and which is sponsored by the Oracle Development Tools User Group (ODTUG).  For those who don't know what ODTUG is, it is an independent user group and community of professionals, with a primary focus on the tools, products, and frameworks to build solutions and applications with the Oracle technology stack.  Although ODTUG is based in the USA, they have members (thousands of them) around the globe.

The purpose of the APEX Gaming Competition is simply to show off what you can do with APEX, and instead of crafting a business solution or transactional application, the goal here is a bit more whimsical and fun.  The solution can be desktop or mobile or both.  Personally, if I had the time, I'd like to write a blackjack simulator and try and improve upon the basic strategy.  I'm not sure that could be classified as a "game", but it would enable me to go to Las Vegas and clean house!

If you're looking to make a name for yourself in the Oracle community, one way to do it is through ODTUG.  And if you're looking to make a name for yourself in the APEX community, one way to stand out is through the APEX Gaming Competition.  Just ask Robert Schaefer from Köln, Germany.  Robert won the APEX Theming Competition in 2014, and now everyone in the APEX Community knows who Robert is!  I've actually had the good fortune of meeting Robert in person - twice!

Yesterday I listened to the APEX Talkshow podcast with Jürgen Schuster and Shakeeb Rahman (Jürgen is a luminary in the APEX community and Shakeeb is on the Oracle APEX development team, he is the creator of the Universal Theme).  And in this podcast, I was reminded how Shakeeb's first introduction to Oracle was...by winning a competition, when he was a student!  You simply never know what the future holds.  So - whether you're a student or a professional, whether you're in Ireland or the Ivory Coast, this is an opportunity for you to shine in front of this wonderful global APEX Community.  Submissions close in 2 months, so hurry!  Go to http://competition.odtug.com

Cloudera certifies InfoCaptor for Big Data analytics on Hadoop

Nilesh Jethwa - Wed, 2015-08-12 14:12

Cloudera welcomes InfoCaptor as a certified partner for data analytics and visualization. InfoCaptor delivers self-service BI and analytics to data analysts and business users in enterprise organizations, enabling more users to mine and search for data that uncovers valuable business insights and maximizes value from an enterprise data hub

Rudrasoft, the software company that specializes in data analytics dashboard solutions, announced today that it has released an updated version of its popular InfoCaptor software, which includes integration with Cloudera Enterprise. The integration takes advantage of Impala and Apache Hive for analytics.

“Our clients are increasingly looking to adopt Hadoop for their data storage and analytics requirements and their common concern is the lack of an economical web-based platform that works with their traditional data warehouses, RDBMS and with Cloudera Enterprise,”

Cloudera-certified InfoCaptor, adds native Impala functionality within Visualizer so users can leverage Date/time functions for date hierarchy visualizations, time series plots and leverage all the advanced hierarchical visualization natively on Cloudera Enterprise.

“Impala is the fastest SQL engine on Hadoop and InfoCaptor can render millions of data points into beautiful visualizations in just a blink of an eye,” said Nilesh Jethwa [founder]. “This is a great promise for the big data world and affordable analytics with sub-second response time, finally CEOs and CIOs across industries can truly dream of cultivating a data driven culture and make it a reality.”

“Cloudera welcomes InfoCaptor as a certified partner for data analytics and visualization. InfoCaptor delivers self-service BI and analytics to data analysts and business users in enterprise organizations, enabling more users to mine and search for data that uncovers valuable business insights and maximizes value from an enterprise data hub,” said Tim Stevens, vice president of Business and Corporate Development at Cloudera.

InfoCaptor is an Enterprise Business Analytics and Dashboard software meant for:

  • Data Discovery
  • Visualizations
  • Adhoc Reports
  • Dashboards

InfoCaptor brings the power of d3js.org visualizations and the simplicity of Microsoft Excel and puts it in the hands of a non-technical user. This same user can build Circle Pack, Chord, Cluster and Treemap/Sunburst visualizations on top of Cloudera Enterprise using simple drag and drop operations.
InfoCaptor can connect with data from virtually any source in the world, including SQL database from Microsoft Excel, Microsoft Access, Oracle, SQL Server, MySQL, Sqlite, PostgreSQL, IBM DB2 and now Impala and Hive. It supports both JDBC and ODBC protocols.

InfoCaptor also serves as a powerful visualization software and it includes over 30 vector-based map Visualizations, close to 40 types of chart visualizations, over 100 flowchart icons and other HTML widgets. InfoCaptor also provides a free style dashboard editor that allows quick dashboard mockups and prototyping. With this ability users can place widgets directly anywhere on the page and use flowchart style icons and connectors for annotation and storytelling.

Users can download the application and install it within their firewall.
Alternatively, a cloud offering is also available at https://my.infocaptor.com or Download dashboard software

 

InfoCaptor is a very modestly priced Analytics and Visualization software
” Personal Dashboard License can be purchased for $149/year
” Server license starts at $599/year
” Cloud based subscription starts at $29/user/month

Visit http://www.infocaptor.com or email bigdata(at)infocaptor(dot)com for Demo and Price list

Oracle SOA/BPM 12c: Propagation of Flow Instance Title and Instance Abortion

Jan Kettenis - Wed, 2015-08-12 13:23
Recently I wrote this posting regarding an improvement for setting the title of a flow instance in Oracle BPEL, and BPMN 12c. In this posting I will discuss two related improvements that comes with SOA/BPM Suite 12c, being that the flow instance abortion is automatically propagated from one instance to the other, as well as the flow instance title. Or more precisely, for every child instance the initiating instance is shown together with its name.

Since 12c the notion of composite instance is superseded by that of flow instance, which refers to the complete chain of calls starting from one main instance to any other composite, and further. Every flow has a unique flowId which is automatically propagated from one instance to the other.

Propagation of Flow Instance Title
This propagation does not only apply to the flowId, but also to the flowInstanceTitle, meaning that if you set the flowInstanceTitle for the main instance all called composites automatically get the same title.

So if the flowInstanceTitle is set on the main instance:


Then you will automatically see it for every child instance as well:


Trust but verify is my motto, so I tried it for a couple of combinations of composite types calling each other, including:
  • BPM calling BPEL calling another BPEL
  • BPM initiating a another composite with a Mediator and BPEL via an Event
  • Mediator calling BPEL

Flow Instance Abortion
When you abort the instance of the parent, then all child instances are aborted as well.

In the following flow trace you see a main BPM process that kicks of:
  1. A (fire&forget) BPEL process
  2. Throws an Event that is picked up by a Mediator
  3. Calls another BPM process
  4. Schedules a human task

On its turn the BPEL process in step 1 kicks of another BPEL process (request/response). Finally the BPM process in step 3 also has a human task:


Once the instance of the main process is aborted, all child instances are automatically aborted as well, including all Human Tasks and composites that are started indirectly.


The flip-side of the coin is that you will not be able to abort any individual child instance. When you go to a child composite, select a particular child instance and abort, the whole flow will be aborted. That is different from how it worked with 11g, and I can imagine this will not always meet the requirements you have.

Another thing that I find strange is that the Mediator that is started by means of an event, even is aborted when the consistency level is set to 'guaranteed' (which means that event delivery happens in a local instead of a global transaction). Even though an instance is aborted, you may have a requirement to process that event.

But all in all, a lot easier to get rid of a chain of processes instances than with 11g!!

Make Your Nominations: Oracle Database Developer Choice Awards

OTN TechBlog - Wed, 2015-08-12 10:57

I Did.  You Should. Here's the Nomination Form.  Here's Why:

The Oracle Database Developer Choice Awards celebrate and recognize technical expertise and contributions in the Oracle Database community. We all have an expert in our lives. Here's your chance to nominate them for an award. Who is that expert? Sometimes we're inspired by a technical presentation at an Oracle User Group event or SIG; but more often it's that person who is on the discussion space with an answer or suggestion just when you need it. Either way, it's easier to develop great solutions when we "know" someone in our community...and they are is rooting for us, and even helping us along.

Here's my nomination:  John Stegeman.  And he will be embarrassed and might send me a howler for nominating him. 

John Stegeman is a regular in the Oracle Database Community. When he's not answering questions in the Oracle Database General Questions space, he's commenting on social discussions around the Watercooler. He's a Grand Titan with 243,225 points on the Oracle Community platform and an Oracle ACE. He might not be digging in coding an app today, but then again he just might be because he's clearly got SQL chops. And, while he may not realize it, he's been a tremendous help to me as a community manager because his activities help me keep a pulse on what's going on in the community :)

Here's what you need to know:

  • Nominations are open through August 15.
  • A panel of judges, composed of Oracle ACEs and Oracle employees, will then choose a set of finalists.
  • The worldwide Oracle technologist community votes on the finalists from September 15 through October 15.
  • The winners of the Oracle Database Developer Choice Awards will be announced at the YesSQL! Celebration during Oracle OpenWorld 2015.

Get your nominations in ASAP!

Ciao for now,

LKR


IBM Bluemix Garage New Website

Pas Apicella - Mon, 2015-08-10 07:14
If you keen to know more about the IBM Bluemix garage which is also coming to melbourne shortly this URL is the main page for that. Some good videos here detailing what the Garage stands for.

https://www.ibm.com/cloud-computing/bluemix/garage/
Categories: Fusion Middleware

20 Things Every Computer Science Graduate Should Know Before Starting a Job

Complete IT Professional - Mon, 2015-08-10 06:00

20 Things Every Computer Science Graduate Should Know Before Starting a JobYou’ve completed your Computer Science degree and have got yourself a job. Well done! Welcome to the real world! Now, there are a few things you should know before starting your first day, which I’ve listed in this article.

1 – The Days Can Be Long

Finishing a Computer Science degree will often lead you into a software development-related role. There are usually standard hours for this kind of role, which is something like 9AM to 5PM. The actual hours may be slightly different, but in general, it’s an 8 hour day.

That’s a long time to be at work if you’re new to the industry. If you’re coming from college or university, you may have had a part-time job, where you worked a few hours at the local grocery store or in a cafe or something.

Coming into a role in software development is different. You’ll be in an office. You’ll be sitting down. And you’ll be there for about 8 hours each day.

This is something I didn’t really consider when I started working. Sure, 8 hours may not seem like much, but when you’re sitting down for most of it, you can get pretty tired pretty quickly.

Also, it requires a lot of concentration. University classes are broken up into blocks and often have breaks. The day doesn’t always go for 8 hours at university, either.

So, it might not be something you are used to. The days may seem long.

You’ll get used to them though.

My part-time job in uni was in a restaurant. I found it hard going from a job where I was walking around all the time to a job where I was sitting down all day. But I got used to it.

 

2 – Don’t Be Afraid To Ask Questions

Being a graduate and starting a job means you’re new to the job and new to the industry. People have lower expectations of graduates than other employees.

So, if you’re not sure what to do, ask someone. If you’re not sure what something means, or how something works, ask someone.

You shouldn’t be afraid of asking questions. Everyone in the workplace was new at one stage, so they know what it’s like. They may know the kind of questions you want to ask and the struggles you might have.

If you have a question, ask someone. Ask your manager, ask a co-worker, ask someone you see around in the kitchen. People will usually be happy to help, especially if they know you’re new.

I still ask questions at work when I don’t know what something is. It’s much better to ask a “stupid” question than to make a stupid mistake (even though I don’t think any question is stupid).

 

3 – Take Lots Of Notes

When you start your first job, you’ll be learning a lot. You’ll learn how the company works, how the systems work, who people are, and what each department does.

You should take notes on this. Lots of notes. Don’t rely on your memory, as you’ll be learning a lot of things when you start. There’s no slides or lecture material that’s available that people will send out.

Sure, there may be some documentation and information on the Intranet that describes how the company works, but in most places, the documentation is not kept up to date, or they may be “exceptions” to the document.

Whenever you go to a meeting or are learning something from someone, take notes. Write them down in a notebook, or write them on your computer.

I prefer taking notes on the computer as they’re easy to read (my handwriting is messy), searchable, and accessible anywhere. I use Evernote for this, and if you’re interested in learning how to use it as a software developer, you can get a copy of my Evernote guide.

 

4 – Dress For The Job

If you’ve had a job before, such as a part-time or casual job during your college years, you may have had to wear a uniform. If not, at the very least you might have had some dress standards you needed to stick to.

The same concept is true for full-time work in the IT industry. You’ll need to dress for the job that you’re doing. When I say this, I mean that each company has dress standards, which is criteria of what is appropriate to wear at the office, and what isn’t.

I suggest that when you start working, get an understanding of this dress code, and stick to it. If you are required to wear a suit and tie every day, then wear a suit and tie every day. If you need to wear a shirt and pants but no tie, then wear that every day. If it’s neat jeans and a collared shirt, then you can wear that.

If there is no dress code, just ask about it. Ask someone during the interview or after you have received an offer for the job (if they don’t tell you during this process anyway).

It’s better to know before you start work, than to show up on day one with something inappropriate.

 

5 – If You Have Nothing To Do, Ask For More

Your manager’s role at work is, among many things, to monitor your workload. They will give you tasks to do for the project or team that you’re in.

If you get to a point where you finish the work they have given you, then you have nothing to do. In this situation, ask for more work. Don’t sit there with nothing to do and browse the Internet aimlessly, or play with your phone.

Ask your manager for something else to do. They may not be aware that you’ve run out of work or that you’ve finished it.

They may also want to review what you’ve done. So, if you need to, you can show it to them, or send the work to them to review.

The point of asking for more is to show initiative, and show that you are there to get the job done and help the team, not to slack off until 5PM arrives.

 

6 – Programming In The Real World Is Not Like College

You would have done some programming in college as part of your degree. When you write code, they would have taught you to do some design at the start, and then build your program from there. You would perform tests, compile the code, find an issue, fix it, and repeat.

It would usually move pretty quickly, and the only constraints would be how much effort you wanted to put in. You were often working on it by yourself, so if you wanted to work late to fix something, you could. You could add in any features or designs that you wanted.

Now, in the “real world” of working as a programmer, it works quite differently.

You usually start with the requirements which are provided to you by the business analysts, who get those from the users. The BA’s document them in a way that makes sense for the team, such as in Agile stories or a BRD.

From there, you, as a developer, would analyse them and see if they make sense to you. If they do, you can build them. If not, then you’ll need to clarify them.

After your requirements have been confirmed, you would them start some kind of design. This is done all at the same time, or in stages, depending on the methodology that your team uses.

At some point during the design phase, you may need to estimate how long it would take to build it. In many projects I’ve been on, this is one of the hardest parts to do. The estimate needs to be realistic, but can be hard given that you don’t know what you don’t know.

Once the work has been estimated, it may need to be approved by the project sponsors, to basically say “yes, we are happy with this and wish to proceed”.

From there, you would start the actual development.

Because you’re in a team, you have less control over what you can do with it. You’ll need to stick to the requirements that are provided, but any changes or suggestions you have would need to be confirmed with other people.

If something takes more time than you thought, you may need to put in overtime, or the project team may make a decision to not add that functionality in.

So, basically, it’s not all up to you to do the development, as you’re part of a team, and there are other people paying for the project who specify the requirements.

 

7 – Keep a To-Do List

I started in the IT industry in an application development and support role. It started pretty smoothly, but as I got more experienced, I found I had more work to do and more things to look after. I tried keeping track of things I needed to do, with limited success.

Now, one of the most important things I do at work is maintain a to-do list. It’s also one of the first things I set up when I go to a new client site.

The realisation for this was when I read “How To Get Things Done” by David Allen. He teaches a principle called “Getting Things Done”, or GTD for short. Basically, it involves keeping a written list of everything you need to do, instead of keeping it in your head.

This book and the GTD concept has probably been the most important concept I’ve learnt throughout my career. It’s helped me be more productive in my work and in my life overall.

So, when you get started at a new job, keep a list of things you need to do.

You can do this by:

  • Pen and notebook
  • Evernote list
  • Specific to-do app on your phone
  • Some other method

It doesn’t matter how you keep a to-do list, the important thing is that you actually keep one. It will improve the way you work, and impress your new team with how organised you are.

 

8 – Don’t Take Too Long On Your Breaks

As part of working full time, you’ll probably get an allocated time to take a lunch break. The actual time depends on the company, but I’ve usually been able to take a lunch break of up to one hour, at any time between 12PM and 2PM.

If you’re new to the IT industry, it can be hard to stick to this time, especially if you came from college. College is a bit more relaxed, where you may have skipped a few classes, or had a three hour break for lunch between classes.

With the workplace, it’s a bit different. You’re part of a team that depends on you working and getting things done. It’s also not setting a good impression if you take a lunch break longer than the recommended time.

My lunch breaks are between 30 and 45 minutes, depending on if I need to make phone calls or run errands for the day.

 

9 – Be Careful What You Say and Talk About

Working full time in the IT industry is different to working part-time or studying at college in many respects.

One area where it’s different is what you can say and what you talk about.

You might have felt comfortable talking about anything with your friends in college, or co-workers at your part time job. You could have talked about how drunk you got on the weekend, the crazy things you did, or other aspects of your life.

When you start working full time, there are some topics that are not appropriate to talk about at work.

It’s not usually a good idea to talk about getting drunk or your massive parties on the weekend. It’s also not a good idea to talk about people of the opposite sex in an offensive or discriminatory way. You should also respect other people’s race, religion, and culture.

Some things that you might have said around your friends or other co-workers are just not appropriate in the workplace.

You might already know this, but it’s good to be safe.

 

10 – You Won’t Get Paid Overtime

A part time job in college usually meant that you have a set number of hours you work, and you get paid an hourly rate. Any extra time after that and you’d get overtime.

This is generally how it works, but it depends on the job you have.

In the IT industry, you don’t get paid overtime. You are expected to work the minimum hours, of course, but when the need arises, you’re also expected to put in extra time.

This is all covered under your salary, so you don’t get paid extra for the additional hours you do.

This might seem unfair. Why would you put in extra hours if you don’t get paid for it?

Well, there are a few reasons:

  • A project deadline is approaching
  • There’s an issue in a live system that needs fixing
  • You’ve found something takes longer than expected and you’re already behind

So, if you’re expecting to get paid for extra hours, then you probably won’t be. The only exception is if you’re in some kind of on-call support role, as they are often paid for overtime and weekends.

 

11 – You Need To Be Able to Budget

Another important lesson is that you’ll need to learn how to budget your money.

Going from college, where you might have had a part-time job, to full time work, usually results in a big increase in your pay.

You’ll be tempted to spend the money you get, buying new gadgets and going out for dinner.

However, you’ll find that you don;t have enough money for what you want to do. If you need to pay rent, this is something you must pay, and you don’t want to be short one month for rent!

It took me a few years to realise that budgeting is important.

Budgeting might sounds boring, but it’s just the process of working out how much you get paid and how much you need to spend in different areas of your life.

The best way to improve something is to actually track it.

So, to start, write down how much you get paid each period (weekly or monthly, for example)

Write down all of your expenses for that period.

The number you have left over is what you can spend.

Now, this isn’t a personal finance site, so while it’s a topic I’m really interested in, I won’t go into details here.

Two websites that I follow regularly and who offer great financial information are Financial Samurai, and I Will Teach You To Be Rich (by Ramit Sethi).

Both of those websites have a lot of great information. They are both based in the US, but I’ve found the information and concepts valuable even living in Australia.

 

12 – The Environment May Not Always Be Suitable

When you were working on college assignments, you may have done them at home, or gone to the library. You had the option of moving around to find a place that’s suitable for you.

However, when you go to work full time, the environment you work in is fixed. It might not be suitable for the way you work.

The main thing to be aware of is distractions. Because there are so many people in an office, there can be a lot happening.

Some examples of things that can distract you are:

  • Other people getting phone calls
  • Your phone ringing
  • Other people talking to each other nearby
  • People walking around and making noise (closing doors, etc)
  • Some people playing music at their desk
  • Group activities in the office (foosball table, TV)

Working in an environment like this takes a lot to get used to.

Fortunately, over time I’ve been able to block out everything around me and focus on my work, most of the time. Sometimes, though, I don’t even notice when people are talking to me, which can seem a bit rude!

So, it’s just another thing to be aware of. Having distractions in the office can often mean that your work environment isn’t as suitable as you like.

Many offices these days also adopt the open-plan structure, which means they have no partitions between desks and people are sitting close to each other, instead of the high walled cubicles that you see on TV and in movies. This means that noise travels further and it’s easier to get distracted – not good if you’re a developer and need to focus on solving a problem in your code.

 

13 – Managers Love Having Meetings

You might think that managers are responsible for giving you work and managing projects you’re on.

This is true, but there’s also another thing they do with their day.

They have meetings.

So many meetings.

I’ve worked for quite a few clients in my time, and a common theme is that all of the managers are always in meetings for most of the day.

It’s like it’s a requirement of that position, and that it’s the only way to get things done.

I don’t think they actually love the meetings, it’s just an obligation or a way to discuss what needs to happen.

However, you’ll notice that your manager, and probably other managers, will be off in meetings for a long time. It might come as a surprise, but this is just a part of working life.

 

14 – You Can’t Always Install What You Want

Companies like to lock down their employee’s computers for security reasons. The restrictions depend on the company, so some companies are more relaxed than others, but overall, there is usually some kind of restriction on the computer you use at work.

As someone who works in the IT industry, you’re probably pretty familiar with how computers work. You know your way around the operating system and are comfortable with many different programs.

To get things done easier, you might want to install different programs on your computer. Evernote, 7Zip, Sublime, and Dropbox are some examples that I’ve seen.

However, the IT department might have prevented you from installing these. You won’t be allowed to install some programs on your laptop.

This is mainly for security reasons. They set up a company-wide policy that meets their security requirements, and it will either block you from installing this software, or automatically remove it every so often.

This might seem alarming to you, and even quite annoying. What do they know? You’re not going to do anything suspicious! It helps you get your work done?

There are two things you can do. You can suggest to your manager that these tools will help you do your work and see if you can get an exception to the policy.

Or, you can use the tools that are available on your computer.

Most of the time, I’ve just stuck with the tools available on my computer. They are not ideal (I’d rather use Notepad++ than Notepad), but it still lets me get the job done.

 

15 – Keep Your Personal Work To A Minimum

Working full time means that you’ll be occupied during normal business hours – from 9AM to 5PM. This is the time that most other businesses open as well.

As you start working full time and getting more responsibility in life, there are probably more things you need to get done during the day outside of your work.

Some of these are:

  • Booking your car in to the mechanic
  • Buying tickets to events
  • Calling your phone company
  • Shopping for clothes
  • Buying things for your house
  • Keeping track of your finances

Some of the tasks I’ve listed here can be done online while at home. Some other tasks can only be done during business hours. Your phone company may only accept calls between 9 and 5. This means you’ll need to take time out of your day to do this.

When you start working full time, I suggest that you keep this kind of work to a minimum. Don’t spend hours each day going to the shops, making calls, and browsing other sites to get your personal work done.

Sure, you’ll need to do a bit here and there. I recently moved house and there were a lot of calls to make and a lot of places to update my details online. However, I kept it to a certain time each day.

The reason for this is so you set a good impression. You don’t want people to think all you do is your personal to-do list.

The best time to do this is during your lunch break. However, a lot of other people have the same idea, so it’s often busy. If you can’t do it during lunch, choose another time, perhaps in the afternoon, or a time when you don’t have an immediate task to work on.

 

16 – Getting to Work May Take Longer And Have Delays

Aah, the joys of commuting to work.

If you had a part-time job while you were studying, it may have been pretty close to where you live. It could have been the local supermarket, restaurant, or some other kind of retail store.

When I was studying, I worked in a Mexican restaurant which was about a 10 minute drive from home. This was great for getting to and from work.

A lot of full-time jobs are based in a central business district (CBD). This, of course, depends on where you live, but it’s quite common. And, you may not live in the CBD. Which means it will take you longer than what you’re used to getting to work.

You can either drive to work (if you have a car), or get public transport. It depends on where you live, of course. In Melbourne, we have a few choices. I used to drive to work, then I started getting the train.

The time it takes to get to work will be longer than what you’re used to. Don’t be surprised if you find you have to leave home at 7:30 to get to work by 9.

Also, because it’s the time when everyone is going to work, it will be busy. The same drive at night time will be a lot faster than in the morning peak-hour traffic.

It can also mean delays. Car accidents can cause delays for a long time. Delays with public transport may be rare, or quite regular, depending on your city. In Melbourne, they happen almost every day!

So, just be aware that getting to work will take longer than you expect.

 

17 – You’re Not Stuck in One Role

The good news about working in IT is that you’re not stuck to a particular role. In many other industries, you’re often working in a role for a long time, and you get promotions to more senior roles. The roles may be quite similar, just with more responsibility.

However, in IT, you have a lot of flexibility to move around.

Are you a .NET Developer? Great.

Want to move into something focused more on SQL Server? Great, you can do this.

Want to be involved in testing? Sure.

Want to move into project management, or team leading, or business analysis? Sure, you can do that as well.

To move around roles you need some training and some experience. You can use experience in one role to move to the next, so after a couple of years in one role (for example) you can look to move towards a different role, if you want.

Training is the other big factor. You’ll need to know how to do the job that you want, so it’s a good idea to look into some training and learn how the new role works. This will make it easier for you and the company.

Many vendors and companies offer all kinds of training, so do a Google search for some related training courses.

 

18 – This Won’t Be Your Last Employer

The company you start working for in your first job in IT won’t be the last employer. It’s rare for people these days to stay in a job for their entire lives, like our parents or grandparents might have.

Don’t be afraid that you’re taking the wrong job, or that you’ll be stuck at a company. Sure, it’s important to start working at a good job and one that will improve your skills and career, but don’t feel like you need to pick one and commit to it for life.

It’s common for people to move around employers, and it’s a great way to improve your salary (which I teach in my IT Salary Success course).

If you start working somewhere and get some good experience after a few years, you are allowed to leave. Firstly, you should look at your current employer to see if there is room for growth, but if not, you can consider moving employers.

 

19 – Going Out for Drinks the Night Before a Work Day is Not a Good Idea

Young people like to drink. We like to go out with friends for dinner, which leads to drinks. Or we just like to go out and start drinking.

Most of the time, this happens on a Friday or Saturday night.

Sometimes, it happens during the week. Especially when you’re at uni or college. When I was at uni, a lot of bars had “Uni Nights” which were on Tuesdays and Thursdays, where uni students went out and drank.

Going out for drinks is fun. What’s not fun, is going to work the next day after going out drinking.

You might be tempted to have a few drinks on a week night, which leads into a few more drinks, and all of a sudden you’re getting home at midnight and are quite drunk.

You’ve got to get up for work the next day and put in a full day’s performance.

This is one of the hardest things to do in life – working while hungover.

I did it once, and won’t be doing it again.

It’s just not worth it.

So, it probably requires a change in lifestyle if you’re the kind of person who likes to go out and drink during the week.

 

20 – The Quality of Your Work is Important

One of the most important things to know is that the quality of the work that you do is important.

In uni and college, the quality was important as well. You write an assignment, or develop some code for your assignment. Once it’s submitted, it’s marked, you get a result, and that’s it. The assignment is never used again.

A better quality assignment meant a better grade. However, it didn’t last long. The only purpose of the assignment quality was to get a good grade.

In the IT industry, the quality of your work lasts a long time.

You code is deployed to a live, production system, and stays there for years.

Your documentation is used by the team for the entire project, and may even be used by the support team.

Your spreadsheets for your analysis may be used by other people for a while to help them do their job.

So, it’s important to produce good quality work. It helps your team, it helps your team manager, and also helps others who are affected by it.

One of the most important books I’ve read recently is “Clean Code“. It explains the importance of writing good quality, clean code. If you haven’t read it, I suggest you do.

The quality of your work is important as it can also help you get promoted and move into other roles. It’s a reflection of you and how you work, so make sure it’s good!

 

Summary
So, in summary, here are the 20 things that every computer science graduate should know before starting a job:
  1. The days can be long
  2. Don’t be afraid to ask questions
  3. Take lots of notes
  4. Dress for the job
  5. If you have nothing to do, ask for more
  6. Programming in the real world is not like college
  7. Keep a to-do list
  8. Don’t take too long on your breaks
  9. Be careful what you say and talk about
  10. You won’t get paid overtime
  11. You need to be able to budget
  12. The environment may not always be suitable
  13. Managers love having meetings
  14. You can’t always install what you want
  15. Keep your personal work to a minimum
  16. Getting to work may take longer and have delays
  17. You’re not stuck in one role
  18. This won’t be your last employer
  19. Going out for drinks the night before a work day is not a good idea
  20. The quality of your work is important

I hope you found these tips useful. Share this article with your friends and colleagues to spread the word!

Lastly, if you enjoy the information and career advice I’ve been providing, sign up to my newsletter below to stay up-to-date on my articles. You’ll also receive a fantastic bonus. Thanks!

Image courtesy of t0zz / FreeDigitalPhotos.net

Categories: Development

Easy logging and debugging, version 2.0

Gerd Volberg - Mon, 2015-08-10 01:48
Each application needs a simple way to log errors and find them. The following technique can also be used to debug Forms, Reports and PL/SQL. This version 2.0 has an important change. The username ist stored in the debugging-data and the viewname has changed a little bit.

First create the table, sequence and view to store the logging-information:
CREATE TABLE Logging (
ID NUMBER(9) NOT NULL,
SESSION_ID NUMBER(9),
INSERT_DATE DATE NOT NULL,
INSERT_USER VARCHAR2(30) NOT NULL,
TEXT VARCHAR2(2000) NOT NULL);

CREATE SEQUENCE Logging_SEQ;

CREATE OR REPLACE VIEW Logging_desc_V
(ID, SESSION_ID, INSERT_DATE, INSERT_USER, TEXT)
AS SELECT ID, SESSION_ID, INSERT_DATE, INSERT_USER, TEXT
FROM Logging
ORDER BY SESSION_ID DESC, ID DESC;

You need also a package with some functions to start the logging-process
CREATE OR REPLACE PACKAGE PK_DEBUG IS
FUNCTION Debug_allowed RETURN BOOLEAN;
FUNCTION Next_ID RETURN NUMBER;

PROCEDURE Disable;
PROCEDURE Enable;
PROCEDURE Destroy;
PROCEDURE Init (P_Debug_allowed IN BOOLEAN DEFAULT TRUE);
PROCEDURE Write (P_Text IN VARCHAR2,
P_Session_ID IN NUMBER DEFAULT NULL);

G_Debug_allowed BOOLEAN := TRUE;
G_Session_ID NUMBER;
END;
/
CREATE OR REPLACE PACKAGE BODY PK_DEBUG IS
FUNCTION Debug_allowed RETURN BOOLEAN IS
BEGIN
RETURN (G_Debug_allowed);
END;

FUNCTION Next_ID RETURN NUMBER IS
V_ID NUMBER;
BEGIN
SELECT Logging_SEQ.nextval
INTO V_ID
FROM DUAL;
RETURN (V_ID);
END;

PROCEDURE Disable IS
BEGIN
G_Debug_allowed := FALSE;
END;

PROCEDURE Enable IS
BEGIN
G_Debug_allowed := TRUE;
END;

PROCEDURE Destroy IS
BEGIN
Write ('----------------------stopp '
|| to_char (G_Session_ID) || '--');
G_Session_ID := NULL;
END;

PROCEDURE Init (
P_Debug_allowed IN BOOLEAN DEFAULT TRUE) IS
BEGIN
G_Debug_allowed := P_Debug_allowed;
G_Session_ID := Next_ID;
Write ('--start ' || to_char (G_Session_ID)
|| '----------------------');
END;

PROCEDURE Write (
P_Text IN VARCHAR2,
P_Session_ID IN NUMBER DEFAULT NULL) IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
IF Debug_allowed THEN
IF G_Session_ID IS NULL THEN
Init;
END IF;
INSERT INTO Logging (ID,
Session_ID,
Insert_Date,
Insert_User,
Text)
VALUES (Next_ID,
NVL (P_Session_ID, G_Session_ID),
Sysdate,
User,
P_Text);
COMMIT;
END IF;
END;
END;
/

You start a debugging-session with INIT and stop it with DESTROY. Error-Messages are logged using WRITE. For example:
pk_Debug.Init;
pk_Debug.Write ('Hello World - ' || V_Test);
pk_Debug.Destroy;

Parts of your debugging can be deactivated with DISABLE and from this point on nothing will be written into the logging-table until you start ENABLE.

The view Logging_DESC_V shows you the debugging-information, group by the newest session-id.
ID Session Insert-Date     Text
============================================
24 21 10.09.-12:38:48 -------stopp 21--
23 21 10.09.-12:38:48 Hello World - 42
22 21 10.09.-12:38:48 --start 21-------


Try it
Gerd

Ancestor Worship

Greg Pavlik - Sat, 2015-08-08 08:25
Some profound lessons in how to be human that we can learn from our Confucian friends


Fascinating Lives

Greg Pavlik - Fri, 2015-08-07 18:38
There is something, I think, admirable in a quiet life: care for family, constructive participation in community, hard work. But there are times and places (perhaps all times, but not all places?) where simply attending to the simple things of life becomes a kind of impossibility: whether for psychological or moral reasons. I was reflecting on two persons recently who have struck me by not only their intellectual genius but also by the sheer force by which they pushed against the norm, one for reasons of psychology and one for reasons of morality.

Yukio Mishima: narcissist, political fanatic, suicide. And one of Japan's greatest novelists. I recently completed the Sea of Fertility tetralogy, which traces the life of Shigekuni Honda from youth to retirement as a wealthy attorney, centered around what Honda believes are the successive reincarnations of his friend Kiyoaki Matsugae: as a young rightist, a Thai princess and an orphan. The most powerful of the four novels, in my opinion is the second: Runaway Horses. The book seems to rebuke the militant nationalism of Japanese reactionaries, though ironically enough Mishima himself ends his own life under the banner of a similar ideology. Mishima's fascinating portrait of an inherent dark side of youth - a taming of a deep inhumanism - so to speak, comes through almost all the novels, but most strongly in the last. This echoes a theme he developed in The Sailor Who Fell From Grace with the Sea, though I can think of few works that more strongly explore this theme than the Lord of the Flies. In any case, Mishima is masterful in exploring aberrant developmental psychology - even as he, himself, seems to have been stricken with his own disordered personality.

Maria Skobtsova: atheist, symbolist poet, Bolshevik revolutionary - and a renegade nun arrested for helping Jews in Paris by the Gestapo, she allegedly died by taking the place of a Jewish woman being sent to death. Jim Forrest provides a useful overview of her life - unlikely most lives of a Christian saints, this is no hagiography: it is a straightforward story of life. At the same time, we see a life transformed by a dawning realization that self-denial is a path to transformation -

"The way to God lies through love of people. At the Last Judgment I shall not be asked whether I was successful in my ascetic exercises, nor how many bows and prostrations I made. Instead I shall be asked did I feed the hungry, clothe the naked, visit the sick and the prisoners. That is all I shall be asked. About every poor, hungry and imprisoned person the Savior says ‘I': ‘I was hungry and thirsty, I was sick and in prison.’ To think that he puts an equal sign between himself and anyone in need. . . . I always knew it, but now it has somehow penetrated to my sinews. It fills me with awe."

And despite a life dedicated to service, she remained an acute intellectual, a characteristic of so many Russian emigres in Paris. This too reflected her view that redemption and suffering where intertwined - my favorite piece On the Imitation of the Mother of God
- draws this out beautifully.


Mongostat ; A Nifty Tool for Mongo DBA

Pakistan's First Oracle Blog - Thu, 2015-08-06 21:56
One of the main Mongodb DBA's task is to monitor the usage of Mongodb system and it's load distribution. This could be needed for proactive monitoring, troubleshooting during performance degradation, root cause analysis, or capacity planning.

Mongostat is a nifty tool which comes out of the box with Mongodb which provides wealth of information in a nicely and familiar formatted way. If you have used vmstat, iostat etc on Linux; Mongostat should seem very familiar.


Mongostat dishes out statistics like counts of database operations by type (e.g. insert, query, update, delete, getmore). The vsize column  in Mongostat output shows the amount of virtual memory in megabytes used by the process. There are other very useful columns regarding network traffic, connections, queuing etc.


Following are some of the examples of running mongostat.

[mongo@mongotest data]$ mongostat

insert query update delete getmore command flushes mapped  vsize    res faults qr|qw ar|aw netIn netOut conn     time
*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:29
*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:30
*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:31
*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:32
*0    *0     *0     *0       0     2|0       0 160.0M 646.0M 131.0M      0   0|0   0|0  133b    10k    1 12:47:33

*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:34
*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:35
*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:36
*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:37
*0    *0     *0     *0       0     2|0       0 160.0M 646.0M 131.0M      0   0|0   0|0  133b    10k    1 12:47:38

Following displayes just 5 rows of output.

[mongo@mongotest data]$ mongostat -n 5
insert query update delete getmore command flushes mapped  vsize    res faults qr|qw ar|aw netIn netOut conn     time

*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:45
*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:46
*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:47
*0    *0     *0     *0       0     1|0       0 160.0M 646.0M 131.0M      0   0|0   0|0   79b    10k    1 12:47:48
*0    *0     *0     *0       0     2|0       0 160.0M 646.0M 131.0M      0   0|0   0|0  133b    10k    1 12:47:49

In order to see full list of options:

[mongo@mongotest data]$ mongostat --help

Usage:
mongostat

Monitor basic MongoDB server statistics.

See http://docs.mongodb.org/manual/reference/program/mongostat/ for more information.

general options:

--help                     print usage
--version                  print the tool version and exit
verbosity options:
-v, --verbose                  more detailed log output (include multiple times for more verbosity, e.g. -vvvvv)
--quiet                    hide all log output
connection options:
-h, --host=                    mongodb host to connect to (setname/host1,host2 for replica sets)
--port=                    server port (can also use --host hostname:port)
authentication options:
-u, --username=                username for authentication
-p, --password=                password for authentication
--authenticationDatabase=  database that holds the user's credentials
--authenticationMechanism= authentication mechanism to use
stat options:
--noheaders                don't output column names
-n, --rowcount=                number of stats lines to print (0 for indefinite)
--discover                 discover nodes and display stats for all
--http                     use HTTP instead of raw db connection
--all                      all optional fields
--json                     output as JSON rather than a formatted table
Categories: DBA Blogs

Oracle Priority Support Infogram for 06-AUG-2015

Oracle Infogram - Thu, 2015-08-06 16:04

RDBMS

Is Your Database The Next Ticking Time Bomb?, from Database Trends and Applications.

SQL


Oracle Technology

From ArchBeat:



Oracle Utilities


Data Integration


Solaris

Creating Scheduled Services in Oracle Solaris, from the Solaris SMF Weblog.

WebLogic

Responsive UI Support in ADF 12.1.3, from WebLogic Partner Community EMEA.

And from the same source:


Java

Singletons, Singletons..., from The Java Source.

Several good postings at Geertjan’s Blog:





SOA

SOA 12c End-to-end (e2e) Tutorial, from the SOA & BPM Partner Community Blog.

And from the same source:


EBS

From the Oracle E-Business Suite Support blog:







From the Oracle E-Business Suite Technology blog:







Visitas estudiantiles a Oracle MDC

Usable Apps - Thu, 2015-08-06 08:17

Sarahi Mireles (@sarahimireles), User Experience Developer, nos cuenta de la reciente visita del Instituto Tecnológico de Estudios Superiores de Zamora para conocer el Centro de desarrollo de Oracle en México (MDC), como parte de un programa de Oracle MDC para estudiantes de TI.

Sarahi and Karina at the Event in MDC

Sarahi con Karina Nava (Database developer) explican algunas de las áreas donde los estudiantes de TI pueden desarrollar su carrera en Oracle

Cada semestre en Oracle Mexico Development Center (A.K.A. MDC) le damos la bienvenida a cientos de estudiantes del área de Telecomunicaciones e Informática como una oportunidad de conocer el centro de desarrollo y las distintas áreas en las que Oracle es líder en el mercado.

Students learn about the important role of Oracle MDC and IT

Estudiantes aprenden acerca del importante rol de Oracle MDC en el desarrollo de nuevas tecnologías y el trabajo que ahí se hace.

Estudiantes de diferentes universidades de todo el país han llegado para conocer más sobre Oracle y cómo estamos revolucionando no sólo nuestro país sino el mundo con las nuevas tecnologías de información. Junto con otros compañeros, yo soy parte del equipo que recibe a estos estudiantes y les damos una charla corta y divertida sobre qué es Oracle, cómo está impactando las tecnologías de manera global, porqué México para un centro de desarrollo, qué hacemos aquí, cómo es nuestro ambiente de trabajo y lo increíble que es trabajar para una empresa de nivel y reconocimiento internacional.

Students gather on the balcony at MDC for a group photograph

Los estudiantes de las distintas universidades toman un pequeño recorrido por las instalaciones de Oracle MDC. Aquí, los estudiantes en uno de los balcones.

Te gusta la idea de visitarnos y eres estudiante o maestro del ramo de Tecnologías de Información? Ponte en contacto con Laura Ramos o para conocer los detalles y programar una visita.

Flying Monkeys! Fun at work with UX. What's on your desk?

Oracle Applications User Experience mezclando la diversión y el trabajo en la nube!

Puedes leer más acerca de Oracle MDC en nuestra página de Facebook y conocer más acerca del equipo Oracle Applications User Experience en el website de Usable Apps.

Oracle ADD_MONTHS Function with Examples

Complete IT Professional - Thu, 2015-08-06 06:00

Oracle ADD_MONTHS Function with ExamplesIn this article, I’ll explain how the very useful ADD_MONTHS function works and use some examples.

Purpose of the Oracle ADD_MONTHS Function

The purpose of the Oracle ADD_MONTHS function is to add a specified number of months to a date, and return another month.

 

Syntax

The syntax of the ADD_MONTHS function is:

ADD_MONTHS ( input_date, number_months )

The function returns a DATE value.

 

Parameters

The parameters of the ADD_MONTHS function are:

  • input_date (mandatory): This is the starting date, or the date that you will add a number of months to.
  • number_months (mandatory): This is an integer value that represents the number of months to add to input_date.

Some things to note about this function:

  • The input_date can be any DATETIME value, or a value that can be converted to DATE (such as a VARCHAR2 formatted as a date).
  • The number_months can be any integer value, or a value that can be converted to an integer (such as a VARCHAR2 formatted as a whole number).
  • The return type is always DATE, even if the data type supplied for input_date is not a DATE.

 

What If The Number Of Days Are Different?

This is a valid question. What would happen if you try to add to a month using ADD_MONTHS, with the original date being at the end of the month, and the resulting month doesn’t have that day?

Well, the function would return the last day of the resulting month.

For example, adding 3 months to January 31 will return April 30 (because April only has 30 days).

 

Is There An Oracle ADD_DAYS Function Like ADD_MONTHS?

No, there is no ADD_DAYS function in Oracle.

However, you can easily add or subtract a day from a date by just adding the number to it.

For example, to add 3 days to today’s date:

SELECT SYSDATE + 1 FROM dual;

To subtract 7 days from today’s date:

SELECT SYSDATE - 7 FROM dual;

There doesn’t need to be an extra function to do this.

 

Is There An Oracle ADD_YEARS Function Like ADD_MONTHS?

No, there is also no ADD_YEARS function in Oracle.

The good news is you can use ADD_MONTHS with a number_months parameter of 12, to add a single year. You can use multiples of 12 to add more years.

Also, you can use negative numbers to subtract years (such as -12).

See the Examples section below for more details.

 

Can Oracle ADD_MONTHS Subtract Months?

Yes, you can subtract months using the ADD_MONTHS function by simply using a negative number as the number_months parameter.

See the Examples section below for more details.

 

How Do You Get The First Day Of The Month Using Oracle ADD_MONTHS?

There are several ways to get the first day of the month, and one is using ADD_MONTHS.

SELECT TRUNC(ADD_MONTHS(LAST_DAY(SYSDATE)+1,-1) FROM dual;

You can also use the TRUNC function by itself:

SELECT TRUNC(SYSDATE,'MM') FROM dual;

 

Examples of the Oracle ADD_MONTHS Function

Here are some examples of the ADD_MONTHS function. I find that examples are the best way for me to learn about code, even with the explanation above.

Example 1

This example shows how to add one month to the current date.

SELECT SYSDATE,
ADD_MONTHS(SYSDATE, 1) as ADD_MONTH_RESULT
FROM dual;

Result:

SYSDATEADD_MONTH_RESULT06/AUG/201506/SEP/2015

The ADD_MONTH_RESULT shows that one month has been added to the date.

 

Example 2

This example shows how to add six months to the current date.

SELECT SYSDATE,
ADD_MONTHS(SYSDATE, 6) as ADD_MONTH_RESULT
FROM dual;

Result:

SYSDATEADD_MONTH_RESULT06/AUG/201506/FEB/2016

The result is six months added to the current date, which results in Feb 6, 2016.

 

Example 3

This example shows how to add a larger number of months.

SELECT SYSDATE,
ADD_MONTHS(SYSDATE, 41) as ADD_MONTH_RESULT
FROM dual;

Result

SYSDATEADD_MONTH_RESULT06/AUG/201506/JAN/2019

The result is in January 2019, which is 41 months into the future.

 

Example 4

This example shows how to subtract months by using a negative number

SELECT SYSDATE,
ADD_MONTHS(SYSDATE, -6) as ADD_MONTH_RESULT
FROM dual;

Result

SYSDATEADD_MONTH_RESULT06/AUG/201506/FEB/2015

The result is in February 2015, which is 6 months before the SYSDATE.

 

Example 5

This example shows the use of a number inside quotes, which is actually a CHAR but should get treated like a numeric value.

SELECT SYSDATE,
ADD_MONTHS(SYSDATE, '5') as ADD_MONTH_RESULT
FROM dual;

Result:

SYSDATEADD_MONTH_RESULT06/AUG/201506/JAN/2016

The result is a date in January 2016, which is five months into the future.

 

Example 6

This example shows a text value inside the number_months parameter.

SELECT SYSDATE,
ADD_MONTHS(SYSDATE, 'Six') as ADD_MONTH_RESULT
FROM dual;

Result:

ORA-01722: invalid number
01722. 00000 -  "invalid number"

This is because I used the value of “Six”, which isn’t actually a number.

 

Example 7

This example uses a specific date as the input date, instead of SYSDATE.

SELECT TO_DATE('08-JUL-2015') as INPUT_DATE,
ADD_MONTHS(TO_DATE('08-JUL-2015'), 1) as ADD_MONTH_RESULT
FROM dual;

Result:

SYSDATEADD_MONTH_RESULT08/JUL/201508/AUG/2015

As you can see, a single month is added to the specified date.

 

Example 8

This example uses a decimal number as the number of months to add.

SELECT SYSDATE,
ADD_MONTHS(SYSDATE, 2.3) as ADD_MONTH_RESULT_LOW,
ADD_MONTHS(SYSDATE, 2.9) as ADD_MONTH_RESULT_HIGH
FROM dual;

Result:

SYSDATEADD_MONTH_RESULT_LOWADD_MONTH_RESULT_HIGH06/AUG/201506/OCT/201506/OCT/2015

In both cases, the value is the same. This is because the decimal value has been rounded down to 2, even if the 2.9 would normally be rounded up to 3.

 

Example 9

This example shows how you can add a year to a date.

SELECT SYSDATE,
ADD_MONTHS(SYSDATE, 12) as ADD_MONTH_RESULT
FROM dual;

Result:

SYSDATEADD_MONTH_RESULT06/AUG/201506/AUG/2016

The result is a date one year into the future.

 

Example 10

This example shows how to find the first day of the month using the ADD_MONTHS function.

SELECT SYSDATE,
TRUNC(ADD_MONTHS(LAST_DAY(SYSDATE)+1,-1)) as FIRST_DAY
FROM dual;

Result:

SYSDATEADD_MONTH_RESULT06/AUG/201501/AUG/2016

As you can see, the result is the first day of the month that was provided.

 

Similar Functions

Some functions which are similar to the ADD_MONTHS function are:

  • TRUNC – Truncates a datetime into a date format.
  • LAST_DAY – Returns the date of the last day of the specified month.

You can find a fill list of Oracle SQL functions here.

Lastly, if you enjoy the information and career advice I’ve been providing, sign up to my newsletter below to stay up-to-date on my articles. You’ll also receive a fantastic bonus. Thanks!

Categories: Development

Old Becomes New - Maker Stuff

Floyd Teter - Wed, 2015-08-05 13:23
A bit of a personal tangent for this post, as I've experienced an interesting development in life recently.  I’m taking another run at the “Maker” concept after taking a few months away from it. And I’m coming at it from an entirely different angle.  The combination of data, radio waves and networks has piqued my interest.  Some background:

My father was an amateur radio operator back in the day.  It was one of his passions…so much so that his radio call sign (K0RFS) is engraved on his tombstone.  Big radio, big amplified, big antenna tower with multiple antennas in the backyard, the best Morse code keys money could buy, etc.  He saw it as both a hobby and a way to render service to others (he used to patch up a local family of Argentine immigrants with their family back home on a regular basis).  Dad’s heyday in amateur radio started immediately after WWII and continued through his passing in 1990.

Amateur radio technology is generally very old school.  Marconi made the first wireless radio contact from Cape Cod into Europe in 1912 using Morse code.  Voice technology was added around 1921.  We’ve seen the additions of packet radio, APRS, RTTY, SSTV, PSK31, radio propagation beacons, radio satellites, and other interesting stuff.  But it all comes back around to the same old radio wave technology.

Except it’s not.  Amateur radio operators can communicate with radios across the internet utilizing the IRLP system.  Heck, you don’t really even need a radio to play anymore - EchoLink allows computer>radio, radio>computer, and even computer>computer communication.  And it’s the merging of old technology with more recent technology in new and interesting ways that has really gnawed at my imagination.

Becoming a licensed ham radio guy has been on my bucket list, mostly as a tip o the hat to the old man.  Years in coming, I finally passed the Technician’s exam here in the States and thus earned my license (call sign K1RFS…what else?).  And I’m planning on using my Tech privileges as a springboard into some interesting maker experiments.  Some of the things on my project backlog include:
  • Building a Yagi antenna from a metal tape measure and PVC - and using that antenna to talk with the ISS
  • Making an OS-agnostic communication logging program in Oracle APEX
  • Working with amateur radio frequency beacons to track objects in areas without internet or cell service - power generation here will be interesting - then creating RESTful services to display the tracking of  those locations
  • Building an HMSS mesh net in my home that can be accessed via radio wave technology - 2nd step includes reliability when the electrical grid is offline
  • Creating a permanent IRLP node with a Raspberry Pi
  • Leveraging a combination of an AMSAT satellite and a smart phone to send and receive amateur TV images wirelessly - my target audience is one of the science exploration stations in Antartica
  • Communicating via IRLP and Echolink through wearable hardware
Old becomes new.  This should be fun!

Pages

Subscribe to Oracle FAQ aggregator