Complete IT Professional http://www.completeitprofessional.com Helping Software Developers Get Ahead In Their Careers Thu, 16 Jul 2015 11:00:52 +0000 en-US hourly 1 http://wordpress.org/?v=4.2.3 Oracle LTRIM Function with Exampleshttp://www.completeitprofessional.com/oracle-ltrim/ http://www.completeitprofessional.com/oracle-ltrim/#comments Thu, 16 Jul 2015 11:00:52 +0000 http://www.completeitprofessional.com/?p=3960 ]]> Oracle LTRIM FunctionThe LTRIM function removes characters from the left side of a string. Learn more about it and see some examples in this article.

Purpose of the Oracle LTRIM Function

The purpose of the LTRIM function is to remove a specified character from the left side of a string. The L in LTRIM stands for “Left”, and is the opposite of the RTRIM or “Right” Trim function.

 

Syntax

The syntax of the Oracle LTRIM functions is:

LTRIM( input_string, [trim_string] )

 

Parameters

The parameters of the LTRIM function are:

  • input_string (mandatory): This is the string to remove characters from the left-hand side of.
  • trim_string (optional): This is the string to be removed from the input_string. If it is not specified, a space is used, and all spaces are removed from the left of the input_string.

Some points to note about LTRIM:

  • If the trim_string is a literal value, you need to include it inside single quotes. For example, to remove an underscore, you need to specify it as ‘_’
  • Both input_string and trim_string can be of data type CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB.
  • The returned value is a VARCHAR2 data type if the input types are CHAR, VARCHAR2, NCHAR or NVARCHAR2, and the returned value is a LOB data type if the input types are LOB or CLOB.
  • The trim_string can be more than one character
  • The function removes each individual value inside trim_string, not the string as a whole. See the Examples section below for more information.

 

Can You Use Oracle LTRIM To Remove Leading Zeroes?

Yes, you can. It’s one of the more common uses for the function that I’ve seen.

This can be done as:

LTRIM(value, ‘0’)

See the Examples section below for more information.

 

Can You Use Oracle LTRIM with RTRIM?

Yes, you can, and it works in the same way as just using the TRIM function.

You’ll need to use one inside the other, and it doesn’t really matter which one is used first.

So, you can use either LTRIM(RTRIM(value)) or RTRIM(LTRIM(value)).

See the Examples section below for more information.

 

Are There Other Ways for Oracle to Trim Strings?

Yes, there are a few ways you can trim strings in Oracle:

  • Use LTRIM or RTRIM
  • Use TRIM
  • Use REPLACE
  • Use SUBSTR if you need more advanced trimming features
  • Use regular expressions

 

Examples of the LTRIM Function

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

Example 1

This example demonstrates a simple LTRIM with no trim value specified.

SELECT LTRIM('    Complete IT Professional')
AS LTRIM_EXAMPLE FROM DUAL;

Result:

LTRIM_EXAMPLE
Complete IT Professional

The extra spaces are removed from the original value.

 

Example 2

This example uses a specific value to trim.

SELECT LTRIM('___Complete IT Professional', '_')
AS LTRIM_EXAMPLE FROM DUAL;

Result:

LTRIM_EXAMPLE
Complete IT Professional

The underscores are removed from the original value.

Example 3

This example uses LTRIM with several characters as the string to trim.

SELECT LTRIM('; ; ; ; ; Complete IT Professional', ' ; ')
AS LTRIM_EXAMPLE FROM DUAL;

Result:

LTRIM_EXAMPLE
Complete IT Professional

Both the spaces and semicolons are removed from the original value.

 

Example 4

This example uses LTRIM  on data in a table, instead of providing a value.

SELECT country, LTRIM(country, 'U')
AS LTRIM_EXAMPLE FROM customers;

Result:

COUNTRYLTRIM_EXAMPLE
USASA
USASA
CanadaCanada
UKK
USASA
(null)(null)
FranceFrance
(null)(null)

The capital U is removed from several values.

 

Example 5

This example uses LTRIM on data in a table with several characters in the trim parameter.

SELECT full_address, LTRIM(full_address, '1')
AS LTRIM_EXAMPLE FROM customers;

Result:

FULL_ADDRESSLTRIM_EXAMPLE
10 Long Road0 Long Road
50 Market Street50 Market Street
201 Flinders Lane201 Flinders Lane
8 Smith Street8 Smith Street
14 Wellington Road4 Wellington Road
80 Victoria Street80 Victoria Street
5 Johnson St5 Johnson St
155 Long Road55 Long Road

The “1” characters are removed from several address values.

 

Example 6

This example uses LTRIM  with 0 as the parameter.

SELECT LTRIM('000Complete IT Professional', 0)
AS LTRIM_EXAMPLE FROM DUAL;

Result:

LTRIM_EXAMPLE
Complete IT Professional

The zeroes are removed from the original value.

 

Example 7

This example uses both LTRIM and RTRIM in the one expression.

SELECT LTRIM(RTRIM('___Complete IT Professional__', '_'), '_')
AS RTRIM_EXAMPLE FROM DUAL;

Result:

LTRIM_EXAMPLE
Complete IT Professional

The underscores are removed from both sides of the original value.

 

Example 8

This example uses Unicode characers as the trim parameter.

SELECT LTRIM('ééComplete IT Professional', 'é')
AS LTRIM_EXAMPLE FROM DUAL;

Result:

LTRIM_EXAMPLE
Complete IT Professional

The accented “e” character is removed from the original value.

Similar Functions

Some functions which are similar to the LTRIM function are:

  • RTRIM – Trims characters from the right of the string. The opposite of the LTRIM function.
  • TRIM – Trims characters from both the left and right side of the string. A combination of LTRIM and RTRIM.
  • SUBSTR – Extracts one value from a larger value. Not really a TRIM function but does something similar.
  • REPLACE – Replaces occurrences of one text value with another.

You can find a full list of Oracle 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!

Image courtesy of digitalart / FreeDigitalPhotos.net

]]>
http://www.completeitprofessional.com/oracle-ltrim/feed/ 0
How To Keep Calm at Workhttp://www.completeitprofessional.com/how-to-keep-calm-at-work/ http://www.completeitprofessional.com/how-to-keep-calm-at-work/#comments Mon, 13 Jul 2015 11:00:49 +0000 http://www.completeitprofessional.com/?p=3964 ]]> How To Keep Calm at WorkAs part of your job in the IT industry, there will no doubt be times that you will get annoyed and stressed. Learn how to keep calm at work with some tips in this article.

Take a Deep Breath

When I’m not feeling calm at work, the first thing I do is stop and take a big, deep breath. It makes me stop what I’m doing for a few seconds and focus just on the breath that I’m taking.

It always makes me feel better, especially when I’m annoyed about something.

So, next time you’re feeling stressed, annoyed, or irritated about something at work, try this.

  • Stop what you’re dong.
  • Take one big deep breath in.
  • Breathe it all out.
  • Resume what you were doing.

That whole process only takes about ten seconds. But, it allows you to re-focus on what you’re doing and can have a calming effect on you.

 

Remember the Bigger Picture

Another tip that I can suggest to keep calm at work is to remember the bigger picture of why you’re there.

If you’re getting annoyed at someone else or having a disagreement with them over the way a certain feature should be developed for your project, for example, then one thing you can do is to try think of the bigger picture.

What’s the overall plan for what you’re doing? What are you both trying to achieve?

If you have different ideas on how something should be done, for example, you could be disagreeing over how it’s being done. Think about why you’re both there, on the project.

Are you trying to add a new feature to make the customers’ lives easier? Are you trying to improve an internal system? Make a new system from scratch?

If you can see what you’re both trying to do at a high level, and see things from the other person’s point of view, it can help you keep calm at work.

 

Get Away From Your Desk

Another tip I can suggest is to get away form your desk if you want to calm down.

You can try go for a walk outside. Get out of the office and get some fresh air. Walk around the block, down to th ecar park, to the coffee shop – anything to get outside and get some fresh air.

The exercise, the fresh air, and taking a break from your work all contribute to helping you keep calm at work. It can also give you more energy.

If you can’t walk outside for whatever reason, if it’s pouring with rain for example, then take a walk to the ktichen or somewhere else inside.

You can go get a coffee or a glass of water or something. This can help you feel better at work and also gets you away from the desk.

In any case, when you return to what you were doing, you should feel a little calmer and a little better.

 

Vent To A Friend

We can do all of the breathing and walking outside that we want, but sometimes, it just isn’t enough.

I mean, most of the time it works for me, but there’s been a few times over the years where I’ve felt really annoyed.

If you feel the same way, then speak to a friend of yours about it and tell them the story.

You can speak to your partner, a friend outside work, a family member, or someone in your team, depending on the issue.

Sometimes it can really help if you just get it off your shoulders and just express the way you’re feeling to someone.

It’s not something I suggest doing all of the time, but it can help sometimes if you really just can’t focus on your work and whatever the issue is has really thrown you off your game.

 

Readers: What methods do you use to keep calm at work after something goes wrong? Do you have any other tips to share about staying calm? Share them in the comments section below.

Career Action Tip: Next time you’re feeling annoyed about something at work, remember to take a deep breath and consider going for a short walk outside.

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 stockimages / FreeDigitalPhotos.net

]]>
http://www.completeitprofessional.com/how-to-keep-calm-at-work/feed/ 0
How To Turn On or Off SQL Developer Autocommit Settingshttp://www.completeitprofessional.com/sql-developer-autocommit/ http://www.completeitprofessional.com/sql-developer-autocommit/#comments Fri, 10 Jul 2015 11:00:43 +0000 http://www.completeitprofessional.com/?p=3984 ]]> SQL Developer AutocommitIn this article, I’ll explain what the SQL Developer Autocommit feature is, where to find it, and how to turn it on or off.

What Is SQL Developer Autocommit?

When you write an SQL statement in SQL Developer, you perform an operation on that data. If you’re just reading the data, this is pretty straightforward.

Where it acts differently is when you change data in the database. This is usually done with the DELETE, INSERT, or UPDATE statements.

If you run an SQL statement that does any of these functions, then the data will be updated, but it won’t be committed.

If you’re not sure what committed means (when we talk about databases), it just means that the data is not permanently saved. It allows you to see the changes in your session, and then you can make a conscious decision to update the changes permanently (committing) or undoing the changes (rolling back).

Now, this is the default behaviour. There are two separate steps to this – running the statement to change the data, and then a second command to commit the changes to the database.

SQL Developer allows you to change this default behaviour, so that the statement is run and the changes are saved in a single step – hence the term “auto commit”.

 

How Do I Change The Autocommit Setting in SQL Developer?

SQL Developer is pretty flexible when it comes to what you can change, and autocommit is no exception.

To find the autocommit setting, go to the Tools > Preferences.

SQL Developer Tools and Preferences

The Preferences window will appear.

SQL Developer Preferences

Click on the + icon next to Database to expand it.

SQL Developer Preferences

Then, click on Advanced.

SQL Developer Preferences Advanced

Here, you’ll see the option for Autocommit.

SQL Developer Preferences Autocommit

Click the checkbox to turn it on.

Here’s what the setting does:

ValueImpact
CheckedAutocommit is on. SQL statements that change data will have their changes automatically committed to the database.
UncheckedDefault. Autocommit is off. SQL statements that change data will not have their changes automatically committed to the database. A separate COMMIT action is needed.

What Are The Disadvantages of Autocommit?

Sure, turning on autocommit may save you time and confusion if you expect changes to be saved but they aren’t.

But there are some disadvantages.

You won’t be able to undo any of your changes by issuing a ROLLBACK statement, as you’d normally be able to do. If you run a DELETE or UPDATE statement, your changes are made permanently, and it’s much harder to get them back

It’s not impossible, though. If you have set up save points or database backups then you can restore from a backup, but it is a hassle.

Generally, I would prefer to have this autocommit option turned off in SQL Developer. The only exception would be if you’re running Oracle Express on your own computer and want to save some time with your SQL.

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!

]]>
http://www.completeitprofessional.com/sql-developer-autocommit/feed/ 0
Oracle RTRIM Function with Exampleshttp://www.completeitprofessional.com/oracle-rtrim/ http://www.completeitprofessional.com/oracle-rtrim/#comments Thu, 09 Jul 2015 11:00:38 +0000 http://www.completeitprofessional.com/?p=3951 ]]> Oracle RTRIM FunctionThe Oracle RTRIM function is one of the most commonly used string manipulation functions in SQL. Learn more about it and see some examples in this article.

Purpose of the Oracle RTRIM Function

The Oracle RTRIM function removes all characters that you specify from the right side of a string.

This is most often used when you want to remove spaces from the right side of the string. However, it can be used for other characters as well, depending on the data.

 

Syntax

The syntax for the Oracle RTRIM function is:

RTRIM ( input_string, [trim_character])

 

Parameters

The parameters of the RTRIM function are:

  • input_string (mandatory): This is the string that will have the characters trimmed from it.
  • trim_string (optional): This is the value to trim or remove from the input_string. If it is omitted, a space character is used for trimming.

The R in RTRIM stands for Right, because it removes the characters from the right of the string.

Some other points to remember:

  • If the trim_string is a literal value, you need to include it inside single quotes. For example, to remove an underscore, you need to specify it as ‘_’
  • Both parameters can be any of the types CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB.
  • The string returned is a VARCHAR2 data type if the input_string was a character, and LOB if it was a LOB data type.
  • The trim_string can be more than one character
  • The function removes each individual value inside trim_string, not the string as a whole. See the Examples section below for more information.

 

Can You Use Oracle RTRIM with Special Characters?

Yes, you can. You can use exclamation points and many kinds of special characters as input.

You can also use unicode characters, such as å, as the function supports NVARCHAR2 types.

See the Examples section for more information.

 

Can You Use Oracle RTRIM with LTRIM?

Yes, you can. It works similar to the TRIM function.

You’ll need to enclose one within the other, and it doesn’t matter which one is outside and which is inside.

So, LTRIM(RTRIM(value)) works the same as RTRIM(LTRIM(value)).

See the Examples section for more information.

 

Can You Use Oracle RTRIM with CHAR or LOB Types?

Yes, the Oracle RTRIM can handle CHAR and LOB types. It can handle CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB data types.

 

Examples of the RTRIM Function

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

 

Example 1

This example demonstrates a simple RTRIM with no trim value specified.

SELECT RTRIM('Complete IT Professional   ')
AS RTRIM_EXAMPLE FROM DUAL;

Result:

RTRIM_EXAMPLE
Complete IT Professional

The extra spaces are removed from the original value.

 

Example 2

This example uses a specific value to trim.

SELECT RTRIM('Complete IT Professional___', '_')
AS RTRIM_EXAMPLE FROM DUAL;

Result:

RTRIM_EXAMPLE
Complete IT Professional

The underscores are removed from the original value.

 

Example 3

This example uses RTRIM with several characters as the string to trim.

SELECT RTRIM('Complete IT Professional; ; ; ; ; ', ' ; ')
AS RTRIM_EXAMPLE FROM DUAL;

Result:

RTRIM_EXAMPLE
Complete IT Professional

Both the spaces and semicolons are removed from the original value.

 

Example 4

This example uses RTRIM on data in a table, instead of providing a value.

SELECT country, RTRIM(country, 'A')
AS RTRIM_EXAMPLE FROM customers;

Result:

COUNTRYRTRIM_EXAMPLE
USAUS
USAUS
CanadaCanada
UKUK
USAUS
(null)(null)
FranceFrance
(null)(null)

The capital A is removed from the “USA” values. It remains on the end of “Canada” because it is a lower-case “a”.

 

Example 5

This example uses RTRIM on data in a table with several characters in the trim parameter.

SELECT full_address, RTRIM(full_address, 'et')
AS RTRIM_EXAMPLE FROM customers;
Result:
FULL_ADDRESSRTRIM_EXAMPLE
10 Long Road10 Long Road
50 Market Street50 Market Str
201 Flinders Lane201 Flinders Lan
8 Smith Street8 Smith Str
14 Wellington Road14 Wellington Road
80 Victoria Street80 Victoria Str
5 Johnson St5 Johnson S
155 Long Road155 Long Road
The letters “e” and “t” are removed from the right of the street names. Some values have been changed to “Str” because all occurrences of these letters are removed, not just those that end in “et”.

Example 6

This example uses RTRIM with 0 as the parameter.

SELECT RTRIM('Complete IT Professional00', 0)
AS RTRIM_EXAMPLE FROM DUAL;

Result:

RTRIM_EXAMPLE
Complete IT Professional

The zeroes are removed from the original value.

 

Example 7

This example uses both LTRIM and RTRIM in the one expression.

SELECT LTRIM(RTRIM('___Complete IT Professional__', '_'), '_')
AS RTRIM_EXAMPLE FROM DUAL;

Result:

RTRIM_EXAMPLE
Complete IT Professional

The underscores are removed from both sides of the original value.

 

Example 8

This example uses Unicode characers as the trim parameter.

SELECT RTRIM('Complete IT Professionalé', 'é')
AS RTRIM_EXAMPLE FROM DUAL;

Result:

RTRIM_EXAMPLE
Complete IT Professional

The accented “e” character is removed from the original value.

 

Similar Functions

Some functions which are similar to the RTRIM function are:

  • TRIM – This function trims characters from both the left and the right of the specified value.
  • LTRIM – This function trims characters from the left of the specified value only.
  • SUBSTR – Extracts one value from a larger value. Not really a TRIM function but does something similar.
  • REPLACE – Replaces occurrences of one text value with another.

You can find a full list of Oracle 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!

Image courtesy of digitalart / FreeDigitalPhotos.net

]]>
http://www.completeitprofessional.com/oracle-rtrim/feed/ 0
How To Turn On Line Numbers in SQL Developerhttp://www.completeitprofessional.com/sql-developer-line-numbers/ http://www.completeitprofessional.com/sql-developer-line-numbers/#comments Wed, 08 Jul 2015 11:00:03 +0000 http://www.completeitprofessional.com/?p=3972 ]]> SQL Developer Line NumbersIn this article, I’ll show you what line numbers are in SQL Developer and how to turn this setting on.

What Are Line Numbers in SQL Developer?

Line numbers are numbers that are next to each line in the Code Editor. They indicate which line of code you’re working on.

They are helpful for developers for many reasons:

  • They let you see how many lines of code you’ve written
  • They help with debugging errors, as error messages usually refer to a line number (related: 7 Debugging Tips To Rapidly Improve Your Programming)
  • They let you refer to a specific line from another place (e.g. when talking to another developer)

SQL Developer - no line numbersBy default, the line numbers are turned off in SQL Developer. Many IDEs have them on by default. I much prefer to have them on, and I’m sure you do too.

Let’s take a look at how to toggle the SQL Developer line numbers setting.

 

 

 

How To Turn Line Numbers On in SQL Developer

So, the first step is to go to Tools > Preferences.

SQL Developer - Tools and Preferences

The Preferences window is now shown.

SQL Developer - Preferences

Then, click on the + next to Code Editor to expand that section.

SQL Developer - Code Editor Preferences

 

Then, click on Line Gutter.

SQL Developer - Line Gutter Preferences

The Show Line Numbers option is then shown.

SQL Developer - Show Line Numbers option

If you check this, the line numbers will appear in your code.

SQL Developer - Show Line Numbers

 

 

SQL Developer Line Numbers Possible Values

So, the Line Numbers setting can be changed to:

ValueImpact
CheckedLine numbers are shown in the Code Editor window
UncheckedDefault. Line numbers are not shown in the Code Editor window.
If you’re wondering how to turn on SQL Developer line numbers, then this is how it’s done, and this is the impact.

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!

]]>
http://www.completeitprofessional.com/sql-developer-line-numbers/feed/ 0
Why You Should Keep In Touch With Your Old Co-Workershttp://www.completeitprofessional.com/keep-in-touch/ http://www.completeitprofessional.com/keep-in-touch/#comments Mon, 06 Jul 2015 11:00:56 +0000 http://www.completeitprofessional.com/?p=3903 ]]> Why You Should Keep In Touch With Your Old Co-WorkersHave you ever thought about keeping in touch with your old co-workers? Do you notice that other people are doing that? And you’re not sure why? In this article, I’ll cover a few reasons why it’s a good idea.

So, you’ve worked with someone for a while. At some point, they will leave the company to get another job. Or, you’ll leave the company to get a different job.

Whether you leave or they leave, you may still want to keep in touch with the person that you used to work with. If you’re the one leaving, then there is probably quite a few people you can keep in touch with.

But why would you do this? There are a few reasons that I’d like to cover where it’s good to keep in touch with your old co-workers.

 

Stay Up To Date On The Industry

When you’ve worked at a place for a while, you and your co-workers get to know the industry pretty well. When I say “industry”, I’m referring to two industries.

First of all, there’s the software industry. As you’ve been working as a software developer or in a role related to software (business analyst, tester, and so on), then you and your co-workers would belong to that industry. It has it’s own news, trends and information.

The second industry is the one for the projects you work on. This may not be that apparent to you, as it depends on the work that you do and how much exposure you have to the actual business.

For example, you may be a software developer working on a banking system. You would be involved in two industries – the software development industry, and the banking industry.

Why is this relevant?

Well, a good reason to catch up with old co-workers is to keep up to date on these industries. They may have moved to a different employer in the same industry, or a different industry, but there would still be news there.

You can share stories, industry news, and things that are happening in the world that you both work in.

Just last night I caught up with an old co-worker that I worked with about five years ago in the utilities industry (gas and electricity). We chatted for about ten minutes about the work there, what was happening, and what has changed. The industry information may not be that relevant to you, but if you’re interested in it, it’s a good reason to catch up with old co-workers.

 

Improve Your Job Searching Chances In The Future

One of the most important and mutually beneficial reasons to catch up with old co-workers is to keep your job searching options open.

If you’ve worked with someone in the past, and continue to catch up with them, it can be a benefit to both of you for any future job searching opportunities that you need.

This is because referring someone that you know to a job opening that you know is a great way for someone to get a job. A personal referral from someone you’ve worked with can go a long way to getting an interview at a company, or getting a job.

It’s one of the ways I teach on how to get a higher paying job, which is one of the strategies from my IT Salary Success course.

I know a few people who catch up with their old co-workers, and when they have been ready or thinking about making the move to another job, they speak to the people they used to work with to see if they know of any opportunities. It’s much easier ot get a job through someone that you know, instead of submitting your resume to a job board.

It may seem like this is a selfish reason to catch up with someone. However, it benefits both of you. You are both keeping your options open in case you need it in the future.

 

Help Solve More Problems

One of the aims of networking, and the benefit of knowing a lot of people, is that you can help solve more problems. Many people say this is the goal of professional networking.

The more people that you know, the better you’ll be able to solve other people’s problems. Getting to know the people in your network, which includes previous co-workers, will help you understand what they know and what they can do.

If anyone you know comes up with a problem that they need help with, you can connect the two people together.

Some examples are:

  • Someone you know is looking for a job, and you may know some recruiters looking for their skills
  • Someone you know needs their house painted, and you know a painter
  • Someone you know needs to sell their house, and you know some real estate agents

The list goes on. Connecting people you know who have problems with those who can fix them is very handy.

Keeping in touch with your old co-workers helps achieve this.

 

Maintain a Friendship

The final reason I’ll suggest for keeping in touch with your old co-workers is to maintain the level of friendship that you had at work.

You may have worked with someone for a long time, and over that time, have developed a friendship. When you leave the company, or when they leave the company, you may want to keep that up.

It can be hard, as there is one less thing that you have in common, but you can still give it a try if you’re both interested.

This can happen if you’ve been at a place for a long time, or even if you’ve only been there for a little while.

I know plenty of people who are friends outside of work, and who stay friends even after they leave a role. It may apply to you, depending on how well you know the person who’s leaving, or the group of people that you’re leaving.

So, in summary, it’s a good idea to keep in touch with your old co-workers for future job opportunities, to help more people, to stay up to date on the industry, and to maintain a level of friendship.

 

What do you think? Do you like catching up with people you’ve worked with? Is there anyone you need to see that you’ve forgotten about? Share your answers in the section below.

Career Action Tip: Make a list of your old co-workers, and decide which of those people you would like to catch up with. Then, see if you can find their contact details and get in touch with them!

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 stockimages / FreeDigitalPhotos.net

]]>
http://www.completeitprofessional.com/keep-in-touch/feed/ 2
Oracle GREATEST Function with Exampleshttp://www.completeitprofessional.com/oracle-greatest/ http://www.completeitprofessional.com/oracle-greatest/#comments Thu, 02 Jul 2015 11:00:34 +0000 http://www.completeitprofessional.com/?p=3944 ]]> Oracle Greatest FunctionThe Oracle GREATEST function is quite useful, but not very well understood. Let’s take a look at the function and see some examples in this article.

Purpose of the Oracle GREATEST Function

The Oracle GREATEST function returns the “greatest” or largest value in a set of values that you provide to it. You can use numbers as well as text values.

It’s the opposite of the LEAST function which I have also written about here.

 

Syntax

The syntax for the Oracle GREATEST function is:

GREATEST ( expr1, [expr_n] )

 

Parameters

The parameters of the GREATEST function are:

  • expr1 (mandatory): This is the first expression to use for comparison.
  • expr_n (optional): This is one or more expressions, separated by commas, to use in a comparison.

How GREATEST Is Calculated

The calculation for GREATEST is pretty simple. It’s similar to how LEAST is calculated.

If the expressions are numeric, the GREATEST function finds the largest number.

If the expressions are characters, the GREATEST function finds the last value if they were sorted alphabetically. A character is considered larger than another character if it has a higher character set value.

See the examples section below for more information on how GREATEST works.

 

What Datatype Is Returned By Oracle GREATEST?

The Oracle GREATEST return datatype depends on a few factors:

  • If the data types of the expressions are different, GREATEST will convert them to the same data type as expr1.
  • All of the expressions are converted to the same data type before the first comparison is done.
  • If any of the expressions are NULL, then GREATEST will return NULL.
  • The return data type is VARCHAR2 if all values are character values.

 

Can You Use GREATEST with a DATE?

Yes, you can. It works in a similar way to other data types. It finds the earliest occurring date.

See the Examples section below for an example that uses DATE fields.

 

What Is The Difference Between Oracle GREATEST vs MAX?

There are a few differences between the Oracle GREATEST and MAX functions:

  • Both MAX and GREATEST will return one result, but MAX is an aggregate function and GREATEST is not.
  • GREATEST can return multiple rows. It will return one row for each row of data you query as it is not an aggregate function.

So, basically GREATEST can be used to go across the row, and MAX can be used to go down the columns, or compare values in the same column in different rows.

 

Examples of the GREATEST Function

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

Example 1

This example uses a few numbers.

SELECT GREATEST(5, 18, 21, 3, 65)
AS GREATEST_CHECK FROM dual;

Result:

GREATEST_CHECK
65

It shows the number 65 as that is the largest number in the list.

Example 2

This example uses a few strings.

SELECT GREATEST('France', 'England', 'Russia', 'Japan')
AS GREATEST_CHECK
FROM dual;

Result:

GREATEST_CHECK
Russia

It shows Russia because the letter R comes before any of the other first characters.

Example 3

This example uses number values inside quotes, to be treated as strings.

SELECT GREATEST('9', '12', '73', '15')
AS GREATEST_CHECK
FROM dual;

Result:

GREATEST_CHECK
9

The result is 9. This is because the first character of 9 comes after any of the other first characters from other values. Then the comparison is done on the second character.

Example 4

This example uses a mix of data types.

SELECT GREATEST('45', 'apple', 'banana', 100)
AS GREATEST_CHECK FROM dual;

Result:

GREATEST_CHECK
banana

The result is banana because it is the last character if the list is sorted.

Example 5

This example uses several dates.

SELECT GREATEST(
TO_DATE('25-MAR-2015'),
TO_DATE('14-APR-2015'),
TO_DATE('7-JAN-2015'))
AS GREATEST_CHECK
FROM dual;

Result:

GREATEST_CHECK
14/A_R/2015

It shows the date from April as it occurs later.

Example 6

This example uses a NULL value in the list of values.

SELECT GREATEST('France', 'England', NULL, 'Japan')
AS GREATEST_CHECK
FROM dual;

Result:

GREATEST_CHECK
(null)

The result is NULL because there is a NULL value in the list of values.

Example 7

This example uses a longer list of values to see how it is treated.

SELECT GREATEST('x', 'w', 'y', 'a', 'q', 'u', 'i', 'a', 'd', 's', 'g', 'k', 'e', 'w', 'i', 'p', 'a', 'z', 'b', 'c', 'm', 'w', 'r', 'y', 'n')
AS GREATEST_CHECK
FROM dual;

Result:

GREATEST_CHECK
z

The result is ‘z’ as it is the largest value.

 

Similar Functions

Some functions which are similar to the GREATEST function are:

  • LEAST – Looks for the smallest value in the specified list of values.
  • MAX – Finds the highest value in a set of values

You can fund a full list of Oracle 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!

Image courtesy of digitalart / FreeDigitalPhotos.net

]]>
http://www.completeitprofessional.com/oracle-greatest/feed/ 0
How To Explain Complicated Topics To Your Managerhttp://www.completeitprofessional.com/how-to-explain-complicated-topics/ http://www.completeitprofessional.com/how-to-explain-complicated-topics/#comments Mon, 29 Jun 2015 11:00:48 +0000 http://www.completeitprofessional.com/?p=3882 ]]> How To Explain Complicated Topics To Your ManagerAs a software developer, the major part of your role involves code. However, there may be times where you need to explain highly technical or complicated concepts or issues to your manager. I’ll explain a few tips on how to explain complicated topics in this article.

Why Is This Hard?

Sometimes, explaining technical things to your manager is hard because they don’t have the same detailed understanding as you do. Their role now involves work allocation, project supervision, and planning for the future. They may not have the same detailed understanding.

Also, depending on the kind of role you’re in, and your team, your manager may not have a technical background. Some team leaders are ex-software developers, but some aren’t.

If they have a technical background, it’s a bit easier to explain technical things to them, as they know more about what you’re talking about. However, it depends on the manager.

 

Use Diagrams

The best way I’ve found by far for how to explain complicated topics to manager or non-technical people is to use diagrams.

Being able to visualise something really helps to understand it.

Draw a picture, a flow chart, a screen layout, a few boxes with arrows, whatever you need to get your point across.

Why does this work?

As you explain things, you can refer to sections of the diagram, which is then translated into something that others can understand.

For example, if you’re trying to explain a defect in one of the systems in your stack of systems, and some possible solutions, it may be hard for others to understand it without a diagram. If you draw a diagram of these systems and where the issue is, along with where the solutions fit in, it’s easier for your manager and others to understand, and easier for you to explain.

I like to draw my diagrams in Visio – it’s one of the tools I recommend for business analysts, but software developers can use it as well. If you don’t have Visio, you can use Powerpoint, or Google Draw (which is free).

 

Don’t Go Into Too Much Detail

When you want to explain technical things to your manager, try not to go into too much unnecessary detail.

This can be a fine line and takes some experience.

If you stay too high level, you won’t get your point across. If you go too detailed, people will get confused. Depending on how technical your manager is and what their level of knowledge is, you may want to stick somewhere in the middle.

You can always go into more detail if someone asks for more information.

It also depends on the issue you’re explaining or the topic you’re talking about.

 

Use Familiar Terms

Another way to help explain technical things to your manager is to use terms that they are familiar with.

In a lot of companies, there is more than one term to describe something. There can often be a technical term (such as a database field or a field in an interface) and a business term (such as the product name or piece of information on a web form).

Now this also depends on who you’re speaking to, but when speaking about something that may have more than one name, try to use the term that they are familiar with.

For example, if you’re talking about an issue in an interface, and the field is called “locality_number_code”, but actually stores something that your manager knows as a ZIP code, then use the term ZIP code. This will help them understand the issue.

It’s good to point out what the more technical name is in some situations, but to assist with understanding, use the name that they know.

 

Use Examples

The final tip that I have is to use examples.

Examples of data, screenshots of systems, or any other example can really help to explain technical things to your manager. It helps for communication in general.

Using examples along with diagrams is a great way to help explain them. Come up with some example data to explain your issue. Or, find or create a screenshot that explains what point you’re trying to raise.

You can use multiple examples. So, if you’re trying to explain how a screen changes in certain situation, use some data that causes it and show the screenshot as well. You can show a before and after screen to demonstrate the issue.

So, using these methods of diagrams, examples, not overly detailed and using familiar terms, can really help you when you want to know how to explain complicated topics to your manager, if you ever need to.

 

Career Action Tip: Next time you’re explaining something complicated or technical, try to use a diagram and familiar terms.

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 stockimages / FreeDigitalPhotos.net

]]>
http://www.completeitprofessional.com/how-to-explain-complicated-topics/feed/ 0
Oracle LEAST Function with Exampleshttp://www.completeitprofessional.com/oracle-least/ http://www.completeitprofessional.com/oracle-least/#comments Thu, 25 Jun 2015 11:00:00 +0000 http://www.completeitprofessional.com/?p=3911 ]]> Oracle LEAST Function with ExamplesThe Oracle LEAST function is quite useful, but not very well understood. Let’s take a look at the function and see some examples in this article.

Purpose of the Oracle LEAST Function

The Oracle LEAST function returns the “least” or smallest value in a set of values that you provide to it. You can use numbers as well as text values.

 

Syntax

The syntax for the Oracle LEAST function is:

LEAST ( expr1, [expr_n] )

 

Parameters

The parameters of the LEAST function are:

  • expr1 (mandatory): This is the first expression to use for comparison.
  • expr_n (optional): This is one or more expressions, separated by commas, to use in a comparison.

 

How LEAST Is Calculated

The calculation for LEAST is pretty simple, and it’s just like how GREATEST is calculated.

If the expressions are numeric, the LEAST function finds the smallest number.

If the expressions are characters, the LEAST function finds the earliest value if they were sorted alphabetically. A character is considered smaller than another character if it has a lower character set value.

See the Examples section below for more information on how LEAST works.

 

What Datatype Is Returned By Oracle LEAST?

The Oracle LEAST return datatype depends on a few factors:

  • If the data types of the expressions are different, LEAST will convert them to the same data type as expr1.
  • All of the expressions are converted to the same data type before the first comparison is done.
  • If any of the expressions are NULL, then LEAST will return NULL.
  • The return data type is VARCHAR2 if all values are character values.

 

Can You Use LEAST with a DATE?

Yes, you can. It works in a similar way to other data types. It finds the earliest occurring date.

See the Examples section below for an example that uses DATE fields.

 

Examples of the LEAST Function

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

 

Example 1

This example uses a few numbers.

SELECT LEAST(5, 18, 21, 3, 65) AS LEAST_CHECK FROM dual;

Result:

LEAST_CHECK
3

It shows the number 3 as that is the smallest number in the list.

 

Example 2

This example uses a few strings.

SELECT LEAST('France', 'England', 'Russia', 'Japan') AS LEAST_CHECK FROM dual;

Result:

LEAST_CHECK
England

It shows England because the letter E comes before any of the other first characters.

 

Example 3

This example uses number values inside quotes, to be treated as strings.

SELECT LEAST('9', '12', '73', '15') AS LEAST_CHECK FROM dual;

Result:

LEAST_CHECK
12

The result is 12. This is because the first character of 1 comes before any of the other values, except 15. Then the comparison is done on the second character.

 

Example 4

This example uses a mix of data types.

SELECT LEAST('45', 'apple', 'banana', 100) AS LEAST_CHECK FROM dual;

Result:

LEAST_CHECK
100

The result is 100 because it is less than both strings, as well as the ’45’ stored as a string.

 

Example 5

This example uses several dates. I’ve used the TO_DATE function to convert strings into dates here.

SELECT LEAST(
TO_DATE('25-MAR-2015'),
TO_DATE('14-APR-2015'),
TO_DATE('7-JAN-2015')) AS LEAST_CHECK
FROM dual;

Result:

LEAST_CHECK
07/JAN/2015

It shows the date from January as it occurs earlier.

 

Example 6

This example uses a NULL value in the list of values.

SELECT LEAST('France', 'England', NULL, 'Japan') AS LEAST_CHECK FROM dual;

Result:

LEAST_CHECK
(null)

The result is NULL because there is a NULL value in the list of values.

 

Example 7

This example uses a longer list of values to see how it is treated.

SELECT LEAST('x', 'w', 'y', 'a', 'q', 'u', 'i', 'a', 'd', 's', 'g', 'k', 'e', 'w', 'i', 'p', 'a', 'z', 'b', 'c', 'm', 'w', 'r', 'y', 'n')
AS LEAST_CHECK
FROM dual;

Result:

LEAST_CHECK
a

The result is ‘a’ as it is the smallest value.

 

Similar Functions

Some functions which are similar to the LEAST function are:

  • GREATEST – Finds the greatest or highest value in a list of values. The opposite of the LEAST function.
  • MIN – Finds the lowest in a set of values. Only returns a single value.

You can find a full list of Oracle 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!

Image courtesy of digitalart / FreeDigitalPhotos.net

]]>
http://www.completeitprofessional.com/oracle-least/feed/ 0
Book Review: Cracking the Career Codehttp://www.completeitprofessional.com/book-review-cracking-the-career-code/ http://www.completeitprofessional.com/book-review-cracking-the-career-code/#comments Mon, 22 Jun 2015 11:00:29 +0000 http://www.completeitprofessional.com/?p=3872 ]]> Cracking the Career CodeI recently read the book “Cracking the Career Code” by Tom Henricksen. Here’s what I thought of it.

Why I Read This Book

I had discovered Tom Henricksen and his site MyITCareerCoach through a Google search for some career-related information a little while ago. I had been reading his site for a while and added it to my Top 100 Blogs for Software Developers in 2015 post.

Soon after that, I had began getting to know Tom and seeing more of what his site had to offer. I purchased his recently-released book, “Cracking the Career Code“, as I saw that his site had some high quality information and wanted to see what his book had to offer.

I ordered the book and had it shipped to me. It arrived in a little over a week, which I thought was pretty good, seeing as I live in Australia and most shipping from the US takes about two weeks.

 

First Impressions

When I received the book, the first impression I had was that it was smaller than I thought. I imagined the book to be thicker, but that could be because the most recent books I had read were bigger (Clean Code, and Soft Skills).

However, as an avid reader and a website owner, I know that size does not necessarily equal value. Just because it is smaller does not mean that it’s any less valuable. The benefits you get from a book should not be related to the thickness of the spine.

With that being said, I like the cover. It’s a clear image, with the title in a big clear font. The image is relevant and plays on the use of the words “cracking” and “code” in the title.

I opened the cover and saw that Tom had personally signed it, which I thought was a great gesture. I like it when authors take the effort to sign their books. It shows they are dedicated to the book.

 

From College To Career

Cracking the Career CodeI would summarise the topic of this book as a guide for college students getting into a career. It starts at the stage of finishing high school, and contains a lot of great advice for getting into colleges. From there, it provides advice for moving into a career that you want.

Now, I’m not at the stage of life that this book is aimed at, but I still learnt a few things from this book.

First of all, I learnt more about the US college system. Living in Australia, we have universities which are more common than colleges. The system is different, but I knew the basics of colleges from watching American movies!

What I learnt in this book about US college I imagine would not have been taught normally to high school kids. I would have found the information valuable if I was at that age and living in the US. That stage of your life can be quite confusing, and a book like this would have certainly helped.

Also, I can’t believe how expensive college is in the US!

My degree cost about $4000 per semester, which ended up to be $12,000 because I went to TAFE (kind of like a technical, hands-on school for getting Diplomas) for two years and it counted towards the three year degree. In Australia, we also had the HECS system where the government pays for your fees in full and you pay them back when you start to work full time.

In the US, as I’m sure my US-based readers know, these degrees are much higher. I didn’t know much about this before reading the book, but in the book Tom mentions one example where the cost of a bachelor’s degree was $37,732 for in-state residents and $97,840 for out-of-state residents.

In addition to that, there is some valuable information on networking within your industry. He covers many other sections, such as the importance of learning throughout your career, which is a great way to improve your career.

 

Overall Rating for Cracking the Career Code

Overall I would give this book 4 stars.

It’s a short book, an easy read, and it has a lot of valuable information for those looking to go to college and get into a career that they really want. As mentioned, I wish I had something like this when I was at that age.

What recommendations would I have for this book?

Tom has a lot of experience in the IT industry, and I would have liked it if there was more focus on the IT industry in this book. He does mention a few stories and tips for the IT industry, but also makes reference to other careers, which are not related to IT. This is good general knowledge, but I think that having it focused on an IT career may have helped.

I think that the examples in the book were helpful, where he mentions people he knows that are in situations or stories that relate to the point he is explaining. I thought that some of these could have been longer, to go into more detail on the point.

Also, some more information about the author could have been helpful. Reading the book, I got an overview of his career, but some more stories and information about the author could have made it more relatable.

Overall, it’s a good read, and it would be helpful to those who are getting ready for college or already in college and looking to get started with their career. It helps to clear up a lot of confusion and questions that college grads or anyone may have.

Career Action Tip: If you are looking to go to college, or are in college and looking for career advice, check out Tom’s book.

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 Amazon / FreeDigitalPhotos.net

Note: The links in this article are affiliate links, which means I get a small commission for any sales, at no extra cost to you.

]]>
http://www.completeitprofessional.com/book-review-cracking-the-career-code/feed/ 0