Complete IT Professional http://www.completeitprofessional.com Helping Software Developers Get Ahead In Their Careers Thu, 02 Jul 2015 11:00:34 +0000 en-US hourly 1 http://wordpress.org/?v=4.2.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
Oracle NULLIF Function with Exampleshttp://www.completeitprofessional.com/oracle-nullif/ http://www.completeitprofessional.com/oracle-nullif/#comments Thu, 18 Jun 2015 11:00:40 +0000 http://www.completeitprofessional.com/?p=3876 ]]> Oracle NULLIF FunctionThe Oracle NULLIF function is another one of Oracle’s NULL-related functions. Let’s take a look at what NULLIF does and what you can use it for.

Purpose of the Oracle NULLIF Function

The Oracle NULLIF purpose is to compare two values, and determine if they match or not.

If the two values match, the function will return NULL. If they don’t match, NULLIF returns the first value.

 

Syntax

The syntax of the Oracle NULLIF function is:

NULLIF (expr1, expr2)

As mentioned above, this function returns either:

  • NULL if expr1 and expr2 match
  • expr1 if expr1 and expr2 don’t match

 

Parameters

The parameters of the NULLIF function are:

  • expr1 (mandatory): This is the first value to use for the comparison. It is also returned if the values do not match.
  • expr2 (mandatory): This is the second value to use for the comparison (between expr1 and expr2).

Some things to note for these parameters:

  • Both expr1 and expr2 can be numeric data types, and the function will work.
  • If the data types of expr1 and expr2 are not numeric, they need to be the same. If not, the function will show an error.

 

NULLIF as a CASE Statement

The Oracle NULLIF function can be rewritten as a CASE statement:

CASE expr1 WHEN expr2 THEN NULL ELSE expr1 END;

Or, it can be written this way:

CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END;

You can read this article for more information on CASE statements.

This function can also be expressed as an IF statement (using general syntax, not Oracle SQL).

if (expr1 = expr2) then
     return null;
else
     return expr1;
end if;

 

Examples of the Oracle NULLIF Function

Here are some examples of the NULLIF 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 NULLIF on two matching number values.

SELECT NULLIF(23, 23) AS NULLCHECK FROM dual;

Result:

NULLCHECK
(null)

The result is NULL because both values match.

 

Example 2

This example uses NULLIF on two number values, but they don’t match.

SELECT NULLIF(23, 29) AS NULLCHECK FROM dual;

Result:

NULLCHECK
23

The result shows 23 because the inputs don’t match, so expr1 is returned.

 

Example 3

This example shows NULLIF with two matching values, but they are entered as different numeric data types.

SELECT NULLIF(23.000, 23) AS NULLCHECK FROM dual;

Result:

NULLCHECK
(null)

The result is NULL because both values match, even though they are different numeric types (decimal and integer).

 

Example 4

This example shows NULLIF on two text values that match.

SELECT NULLIF('Sunday', 'Sunday') AS NULLCHECK FROM dual;

Result:

NULLCHECK
(null)

The result is NULL because both expr1 and expr2 values match.

 

Example 5

This example shows the NULLIF function on two text values that don’t match.

SELECT NULLIF('Sunday', 'Saturday') AS NULLCHECK FROM dual;

Result:

NULLCHECK
Sunday

The result shows expr1 which was provided as ‘Sunday’.

 

Example 6

This example shows NULLIF with two different variable types which have the same value.

SELECT NULLIF('23.7', 23.7) AS NULLCHECK FROM dual;

Result:

ORA-00932: inconsistent datatypes: expected CHAR got NUMBER

The result is an “inconsistent datatype” error, because even though they are the same value, the data types are different.

 

Example 7

This example shows the NULLIF function, again with two different variable types, and the values don’t match.

SELECT NULLIF(SYSDATE, 'Someday') AS NULLCHECK FROM dual;

Result:

ORA-00932: inconsistent datatypes: expected DATE got CHAR

An error is shown here because the data types do not match.

 

Example 8

This example uses a NULL value for expr1.

SELECT NULLIF(NULL, 'Sunday') AS NULLCHECK FROM dual;

Result:

ORA-00932: inconsistent datatypes: expected - got CHAR

An error is shown because you can’t specify a NULL value for the expr1 value.

 

Example 9

This example uses a NULL value for expr2.

SELECT NULLIF('Sunday', NULL) AS NULLCHECK FROM dual;

Result:

NULLCHECK
Sunday

The result is the value of expr1, which is “Sunday”. Expr2 can be NULL for this function.

 

Similar Functions

Some functions which are similar to the Oracle NULLIF function are:

  • COALESCE – Looks at many input values and returns the first non-NULL value.
  • NVL – Allows you to check a value or expression, and if it is NULL, return a different value.
  • NVL2 – Allows you to check for a value or expression, and specify different values if the result is true or false.
  • CASE – This statement allows the functionality of an IF THEN ELSE statement in SQL.

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-nullif/feed/ 0
I Was Let Go – Why It’s Important To Be Prepared With Your Careerhttp://www.completeitprofessional.com/i-was-let-go/ http://www.completeitprofessional.com/i-was-let-go/#comments Tue, 16 Jun 2015 11:00:06 +0000 http://www.completeitprofessional.com/?p=3898 ]]> I Was Let Go - Why It's Important To Be Prepared With Your CareerThe other day I was told that I had to be let go from my contracting position. I’ll tell you the story and what I learnt in this article.

 

Getting the News

For those of you who don’t know, I work as a software consultant. I work full-time for a consulting company who then send me out to other companies when work is required.

I’ve been working at my current client for almost two years, and my current project has been prioritised as the most important one in the department, so it’s been pretty busy for the last six to nine months.

I got told on Tuesday morning from my manager that due to funding issues in the entire department, they were trying to save money before the end of the financial year, and as a result, they had to let all of the contractors go.

Which included me. And at least 50 other people in the department.

They were still sorting out the details and the dates, but it looked like I had a few days to hand over my work to another team member and finish up.

 

What I Thought

I was pretty surprised at this news. I knew something must have gone wrong for them to let go of their contractors.

But, I didn’t feel any anger. No bad feelings at all. I knew it was purely a financial decision and not based on my performance, which my manager assured me.

The good news is because I’m actually employed full time by a consulting company, I would still be getting paid. Regardless of where I went next, I’d still be getting my weekly pay.

Then, I had a few thoughts about what would come next. The plan was for me to go back to the “bench”, which is like the waiting area before you get assigned to a client.

What if I was not able to be placed at another client, and got told I was no longer required? As in, actually lost my job?

There was a high chance of this happening, because companies don’t look for staff in June as it’s the end of the financial year and they generally don’t have any money.

What would I do then?

Would I look for another job? Could I contract on my own? Could I focus on this site full-time? Did I have money to last until I found another job?

There were a few options and things I could do.

 

What’s Happened Since

Fortunately, it’s not all bad news.

My company has found another client for me. This client is actually a team I’ve worked in before, but I’ll be doing a different role there. I’ll be working as an Agile business analyst, similar to what I’m doing now.

Which is great news. I start there immediately, so there’s no break in between clients and a much lower risk of getting made redundant.

I’m writing this article on the way to work on the last day at my current client, and I start at the new place tomorrow.

Throughout this short but intense experience, I’ve learnt a few things.

 

It’s Good To Keep In Contact With Old Co-Workers

I had kept in touch with the people I used to work with, including this team that I’m returning to. I didn’t do it that much, but there was the occasional email and lunch get together.

As the team worked for the same company I did, I also saw them around social events and other company events that were put on.

A recent article I wrote on why it’s good to keep in touch with old co-workers goes into this point in more detail.

I think the fact that I kept in touch with them has helped me move on to this new role. Even if I didn’t, it’s still a good thing to do. If I had gotten fired, I could have spoken to many other people who may have had open positions for me.

 

Always Do A Good Job Wherever You Work

This is probably the biggest factor in how I got the new role.

During the last time that I worked for this client, I did a good job there and got good feedback from them. They were about to start another project which was important to the company, and because the team there knew that I was a good worker, I think it helped my case.

Regardless of if you get into this situation or not, it’s a good idea to do a good job wherever you work. If you are looking for a job anytime in the future, you can contact people you’ve worked with, knowing that it will be easier because you’re a good worker, and they know it.

 

Have a Plan B and Plan C

When I was given the news that I might be moving on, I immediately started thinking about what would come next.

However, it’s something I think about occasionally anyway, even if I don’t have any danger of getting let go.

I’d really like to try contracting at one stage. As in, contracting for myself rather than through another company. I’ll need some more experience in my role to be able to do this, I think, but it’s something I’d like to do.

Also, because I’d kept in contact with people I’d worked with before, and I keep an active LinkedIn profile, there would be a few people I can contact if I needed to get a full-time job at another company. I could work for another consulting firm, or work full time in another IT department.

The lesson here is that we should always have a backup plan, or plan B, and a plan C. Have a couple of options of what you can do, just in case you got let go or something changed that was out of your control.

 

Make Sure You Have Savings

Another important point is to make sure that you have some money saved up.

I had enough in my bank account to last me about two months. Plus, if I was made redundant, I’d get my annual leave paid out which would have helped a bit.

Ideally, I should have more in my savings account, as many of the personal finance blogs that I read suggest.

If you get let go or fired from a job with zero notice, there’s a chance you won’t get paid again from them, or only get a single payment for your leave. This is a risk if you don’t have any savings.

So, as a way to mitigate that risk, or reduce the impact it would have on you, you should have some money saved up.

That way, if you do get fired, it won’t be as bad because you can survive for a little while. It means you don’t need to take the first job that comes up and can find the job that’s right for you, as you don’t have the pressure of having to start work as soon as possible to pay the bills.

 

Well, I hope you enjoyed that story and learnt a few things from it. I hope that it doesn’t happen to you, but if it does, there are a few ways you can be better prepared for it.

 

Career Action Tip: Update your LinkedIn profile and connect with as many old co-workers as you can. Make a plan to build up some savings, if you don’t have any.

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

]]>
http://www.completeitprofessional.com/i-was-let-go/feed/ 0
Oracle UPPER Function with Exampleshttp://www.completeitprofessional.com/oracle-upper/ http://www.completeitprofessional.com/oracle-upper/#comments Thu, 11 Jun 2015 11:00:47 +0000 http://www.completeitprofessional.com/?p=3865 ]]> Oracle UPPER FunctionThe Oracle UPPER function converts a string to uppercase. Let’s take a look at this function with some examples and see how it actually operates.

Purpose of the Oracle UPPER Function

The Oracle UPPER function takes a string input value and converts the characters to uppercase versions of each character. In short, it capitalises a string value.

It’s useful for comparing values that may have mixed case, or to convert input values from user input to check or store in your database.

 

Syntax

The syntax of the UPPER function is quite simple:

UPPER (input_string)

The return value is the same as the input_string value, which can be any of CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB.

 

Parameters

The parameters of the Oracle UPPER function are:

  • input_string (mandatory): The string value to convert into upper case.

As mentioned above, the input_string can be any of several string-based data types.

If the input_string contains any non-alpha characters, they are unaffected. They will remain in the returned string without conversion.

 

Can You Use Oracle UPPER In a WHERE Clause?

Yes, you can use the Oracle UPPER function in a WHERE clause.

To do the comparison, though, you’ll probably need to have both sides of the comparison use the UPPER function.

For example, this would only work if the input_firstname is always in upper case:

WHERE UPPER(firstname) = input_firstname

You may need to do this, depending on your needs:

WHERE UPPER(firstname) = UPPER(input_firstname)

See the Examples section below for more information on how to use this in a WHERE clause.

 

Can You Use Oracle UPPER with a LIKE Statement?

Yes, you can use LIKE with an UPPER function.

You may need to use the UPPER function on both sides, though.

For example, this statement would work if you can specify the comparison value in all caps:

WHERE UPPER(firstname) LIKE ('JO%')

If you can’t specify upper case, then you can use the UPPER function on both sides:

WHERE UPPER(firstname) LIKE UPPER('jo%')

See the Examples section below for more information on how to use this.

 

Can You Use Oracle UPPER On The First Letter?

Yes, you can. It depends on how you want to capitalise the string.

If you want the first letter of every word capitalised, you can use INITCAP.

SELECT INITCAP('this is my sentence') FROM dual;

Result:

This Is My Sentence

 

If you want to capitalise only the first letter of the entire string, then you can use a combination of SUBSTR and UPPER.

SELECT UPPER(SUBSTR('your string here',1,1)) || SUBSTR('your string here',2) FROM dual;

See the Examples below on how to do this with some output.

 

What’s The Oracle UPPER Function Performance Like?

The performance of the UPPER function is not too bad, but the main concerns around performance are where the comparison is done on a database field that does not have the right index.

First of all, for UPPER functions in the where clause, you should be using UPPER on both sides in most situations.

Next, in Oracle, an index is case-sensitive, so a search for “Complete” will be different to a search for “COMPLETE”.

The most important factor is the index. If you have an index on the firstname column, for example, a WHERE condition that uses UPPER(firstname) will not use that index. Not using the index will cause the query to run slower.

See below for how to create an index using the Oracle UPPER function.

 

Can You Create An Index Using the Oracle UPPER Function?

Yes, you can. It’s called a function-based index.

To allow the use of an index, you need to create a function-based index. You should create an index on this column using the UPPER of that column.
For example:
CREATE INDEX idx_upper_name ON customers (UPPER(firstname));
Now the query should run a lot better.

 

Examples of the Oracle UPPER Function

Here are some examples of the Oracle UPPER 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 the basic use of an UPPER function with a simple string.

SELECT UPPER('Complete IT Professional') FROM dual;

Result:

UPPER(‘COMPLETEITPROFESSIONAL’)
COMPLETE IT PROFESSIONAL

The string is converted to all-caps.

 

Example 2

This example uses a combination of numbers and characters.

SELECT UPPER('Complete 2015') FROM dual;

 

Result:

UPPER(‘COMPLETE2015′)
COMPLETE 2015

The string is converted to all-caps and the numbers are unchanged.

 

Example 3

This example uses an UPPER function in a WHERE clause, with the UPPER function on one side. It uses our sample database of customers.

SELECT first_name, last_name
FROM customers
WHERE UPPER(first_name) = 'JOHN';

 

Result:

FIRST_NAMELAST_NAME
JohnSmith

This result shows a single record that matches the uppercase of John.

 

Example 4

This example uses the UPPER function on both sides of a WHERE clause.

SELECT first_name, last_name, country
FROM customers
WHERE UPPER(country) = UPPER('usa');

 

Result:

FIRST_NAMELAST_NAMECOUNTRY
JohnSmithUSA
SallyJonesUSA
AdamCooperUSA

This result shows three records where the country was matched.

 

Example 5

This example uses the UPPER function in the WHERE clause with the LIKE keyword.

SELECT first_name, last_name, country
FROM customers
WHERE UPPER(country) LIKE ('U%');

 

Result:

FIRST_NAMELAST_NAMECOUNTRY
JohnSmithUSA
SallyJonesUSA
MarkAllanUK
AdamCooperUSA

This result shows the matches for the country that starts with the letter “U”.

 

Example 6

This example uses the UPPER function on both sides of the WHERE clause with the LIKE keyword.

SELECT first_name, last_name, country
FROM customers
WHERE UPPER(first_name) LIKE UPPER('m%');

Result:

FIRST_NAMELAST_NAMECOUNTRY
MarkAllanUK

This result shows a single record, where the first name starts with “M”.

 

Example 7

This example converts a string to a string with only the first character capitalised.

SELECT UPPER(SUBSTR('complete it professional',1,1)) || SUBSTR('complete it professional',2) AS upper_text FROM dual;

Result:

UPPER_TEXT
Complete it professional

The query has converted the string to have only the first letter in upper case.

 

Similar Functions

Some functions which are similar to the UPPER function are:

  • LOWER – Converts a string value to all lower case.
  • NLS_UPPER – Converts a string value to uppercase using different character sets.
  • NLS_LOWER – Converts a string value to lowercase using different character sets.
  • INITCAP – Converts the first letter of each word to a capital letter.

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-upper/feed/ 0
How To Stay Focused at Workhttp://www.completeitprofessional.com/how-to-stay-focused-at-work/ http://www.completeitprofessional.com/how-to-stay-focused-at-work/#comments Wed, 10 Jun 2015 11:00:15 +0000 http://www.completeitprofessional.com/?p=3859 ]]> How To Stay Focused at WorkHave you ever had trouble focusing at work? Did you find yourself getting distracted? It happens to all of us. I share some tips on how to stay focused at work in this article.

Get Enough Sleep

The best way to stay focused at work is to be well rested. It’s far easier to focus when you’ve had enough sleep.

Have you ever been to work and had little sleep? Perhaps you’ve been up late working or playing computer games. Or, you’ve had to get up early for your kids or something. In any case, having less sleep can really hurt your ability to focus at work the next day.

Try to get enough sleep on a regular basis. Getting enough sleep is something I recommended before your first day of work, and it’s true for every day of work.

When I first started, there was a night that I went to work after getting 4 hours of sleep. I was a zombie the next day – no amount of coffee could wake me up and make me focus on what I was doing.

So, being well rested by getting enough sleep is a great way to stay focused at work.

 

Always Have One Thing to Do

Assuming you have enough sleep, what’s the next thing you can do to stay focused at work?

I think we should all only have one thing to do at a time.

People are most effective at working when they have a single task to work on. This could be writing code for one module, debugging one issue, writing one document or attending one meeting.

What about multitasking? Multitasking is actually very ineffective. If you are working on two or more things at once, then neither of them are getting your full attention, and it’s even harder to focus on either of them.

It’s much more effective to focus on only one task at a time.

One the other side, if you don’t know what you should be doing, then work out what your most important task is. Get started on that, and only that.

So, you should have only one task at a time to work on. Not two. Not zero. Just one.

 

Imagine the Work as Finished

Something that has really helped me with how to stay focused at work is to imagine the task that I’m currently working on as finished.

I picture the work as already being done, what it looks like, what I feel like. It’s relieving, satisfying, and I’m happy that I got the work done.

This can motivate me to getting the work done and focusing on getting to that point.

If you’re wondering how to stay focused at work, you can try doing that.

Try to imagine your code as being complete. Your document written. Your debug session finished. Imagining this may help you focus on your work.

I’m actually writing this post on my morning commute to work, and while it’s tempting to just sit back and put on the iPod, I’m focused on getting this done because I want to finish it before my stop arrives.

 

Eat Well

The final tip that I have on how to stay focused at work is to eat well. The food that you eat has a remarkable impact on your energy levels and how you feel.

I’m not saying you need to eat like you’re training for a marathon. I think that simple changes in what you eat can have a big impact on your energy.

For example, if you’re eating a lot of processed food, chocolate, and other foods high in sugar, you might find that your energy levels go up and down throughout the day. These kinds of foods will do that to you.

What should you be eating?

I’m no health expert, but with a bit of education, we can all work out what’s good for us and what’s bad for us. Vegetables and fruit are good for you. Healthy rolls or sandwiches can work too.

A little improvement in your diet can really help you improve your energy levels at work and stay focused at work.

 

How To Stay Focused At Work

So, in summary, to improve your focus at work:

  • Get enough sleep
  • Always have one thing to do
  • Imagine the work as finished
  • Eat well

 

Readers, what tips do you have on how to stay focused at work? Do you have trouble focusing? Have you tried anything to improve, and what were the results?

Career Action Tip: Choose one of the items in this article and take the first step to doing it. For example, choose one task to work on right now, and only one.

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

]]>
http://www.completeitprofessional.com/how-to-stay-focused-at-work/feed/ 1
5 Ways to Simplify Your Life with Technologyhttp://www.completeitprofessional.com/5-ways-to-simplify-your-life-with-technology/ http://www.completeitprofessional.com/5-ways-to-simplify-your-life-with-technology/#comments Mon, 08 Jun 2015 11:00:29 +0000 http://www.completeitprofessional.com/?p=3855 ]]> 5 Ways to Simplify Your Life with TechnologyLife is a wonderful crazy rollercoaster. Sometimes, it can be hard to enjoy the wonderful things life has to offer when we are constantly juggling running errands, working, or trying to cook dinner. Thankfully, the wonderful world of technology has provided a few different ways to help simplify our lives, and make them that much more enjoyable.

  1. Put an end to procrastination

We’ve all been there. You have an endless list of errands to run, reports to complete, and calls to make. Even though you know you need to use every second of precious time, you still end up spending an hour on YouTube looking at funny cat videos. Sometimes when we are the busiest is when it is the hardest to focus. Thankfully, there is a new app out called Carrot to help us put an end to the never ending cycle of procrastination. This app punishes you for procrastinating and rewards you for being productive. You can redeem your points for prizes. Nothing like a little extra incentive to help keep you focused.

 

  1. Never miss another episode of Game of Thrones

For those globetrotters out there, you know how frustrating it can be to access internet that is not only safe, but also allows you to watch your favorite TV shows from home. Due to geo-blocking, certain countries around the world do not have access to sites such as Netflix, HBO Go, or Hulu. Even if you do have access to the show of your choice, it may be incredibly slow and challenging to watch.

Thankfully VPNs, or virtual private networks, are here to help. A VPN secures your internet connection and helps ensure that the information being sent or received is encrypted. This encryption allows you to access the sites and televisions services you wish to enjoy. You will never find out who dies on Game of Thrones before watching it again! However, there are many different VPN options to choose from. This site will help get you started on your search for a VPN to help simplify your global lifestyle.

 

  1. Stop the endless piles of junk mail

Do you ever feel like the only thing you ever get in the mail is piles of junk mail to grocery stores and restaurants you’ve never even heard of? Are you sick of being tempted by pictures of Taco Bell burrito coupons? PaperKarma app is here to save the day! All you need to do is simply take photos of your unwanted mail with PaperKarma, and they will take care of the rest by contacting the mailer, and asking that you be removed from the distribution list. Aside from keeping your mailbox clean of junk, you will also be helping the environment by sparing it from the massive piles of junk mail you throw away every year. It’s pretty much a win-win situation.

 

  1. Never get another parking ticket again

Have you ever parked in a spot you thought was fine only to find a nasty parking ticket? Technology can even save you from the pain and suffering of a parking ticket. Can I Park Here is an app that, as you may have guessed, lets you know if it’s okay to park here. Some street signs are incredibly confusing or unclear. This app allows users to take photos of the questionable street signs in the area, and the app will then let you know if you are able to park here and for how long. The app even has a timer that will let you know how much time you have left in your parking spot. Right now it is only available for New York City, but let’s be honest, they probably need this app the most.

 

  1. You may never have to leave your house again (but you probably should)

Food, grocery, and even alcohol delivery services have sprouted up everywhere. But, there is one company that seems to encompass them all, Postmates. Postmates does not only deliver food, but pretty much anything you want. They will deliver a burrito from your favorite taco shop, a Starbucks Frappuccino, or simply a tube of toothpaste. The options are literally endless. You can use Postmates to deliver your embarrassing purchases, or send a friend a unique gift on their birthday. Postmates is one of the ultimate ways to simplify your everyday life.

This is a guest post by Cassie. Cassie is a technology enthusiast and blogger who writes for www.securethoughts.com. She enjoys writing about technology and her main area of interest is internet security.

]]>
http://www.completeitprofessional.com/5-ways-to-simplify-your-life-with-technology/feed/ 0
Oracle EXP Function Explained with Exampleshttp://www.completeitprofessional.com/oracle-exp/ http://www.completeitprofessional.com/oracle-exp/#comments Thu, 04 Jun 2015 11:00:51 +0000 http://www.completeitprofessional.com/?p=3845 ]]> Oracle EXP FunctionThe Oracle EXP function returns the mathematical value of e raised to the nth power. Let’s learn how to use this function and see some examples in this article.

Purpose of the Oracle EXP Function

The purpose of the Oracle EXP function, or exponential function, is to return the value of e raised to a specified power. The value of e is a mathematical constant, and it is roughly equal to 2.71828183.

 

Syntax

The syntax of the EXP functions is:

EXP( number )

We don’t need to specify the value of e, because it’s a standard value (kind of like pi).

 

Parameters

The parameters of the EXP function are:

  • number (mandatory): This is the number that you raise e to the power of. For example, the number of 2 raises e to the power of 2.

The EXP function returns a number of DOUBLE PRECISION data type.

 

Examples of the Oracle EXP Function

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

It’s easier to use than some of the other Oracle functions I’ve described, but it’s still good to see some examples.

 

Example 1

This example shows e raised to the power of 1.

SELECT EXP(1) FROM dual;

Result:

EXP(1)
2.71828182845904523536028747135266249776

It shows the same as e because any number raised to the power of 1 is the same number.

 

Example 2

This example shows e raised to the power of 2.
SELECT EXP(2) FROM dual;

Result:

EXP(2)
7.3890560989306502272304274605750078132

It shows the same as e * e.

 

Example 3

This example shows e raised to the power of 5.
SELECT EXP(5) FROM dual;

Result:

EXP(5)
148.413159102576603421115580040552279624

 

Example 4

This example shows e raised to the power of 4.2.
SELECT EXP(4.2) FROM dual;

Result:

EXP(4.2)
66.68633104092514164502173465399202556393

The result is still shown, because it’s possible to raise a number to the power of a decimal.

 

Example 5

This example shows e raised to the power of -1.
SELECT EXP(-1) FROM dual;

Result:

EXP(-1)
0.3678794411714423215955237701614608674454

The result is less than the original number, as it was raised to a negative number.

 

Similar Functions

Some functions which are similar to the EXP function are:

  • POWER: This function returns one number raised to the power of another number.

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!

]]>
http://www.completeitprofessional.com/oracle-exp/feed/ 0