So you’re asked to present your PowerPoint slides to a group of people on a multimedia projector. Easy, right? Just connect the video cable to your laptop, mirror your screen to the projector and bang, there it is. But what if you have other things on your laptop that you don’t want to display to everybody in the room? We’ll, just extend the monitor and you’re good to go. But then when you start the slide show, it shows on your laptop screen(which is your primary monitor) and not on the second screen. That’s not what you want to happen. What to do now?

Read More →

For those who are familiar with TransactSQL (SQL Server/Sybase), there is this function named SPACE(n). It generates n number of spaces when called. Unfortunately, it has no direct counterpart command in Oracle PL/SQL. However, there’s an alternative and it work just fine. Here’s the sample.


SELECT '->|' || RPAD(' ',5,' ') || '|< -' spacer FROM DUAL

Read More →

xml_image

I recently encountered a request to generate XML in one select query in Oracle to address the problem on the Cartesian table on the query created by another developer. It also addresses the additional overhead from the java program that transforms the data. As we know, Oracle has a number of handy xml functions that can help us do this requirement. For this particular requirement, it’s something new in such a way that it is nested XML beyond the second level. I’ve created queries for similar requests previously but I never did a nested data.

Read More →

Ever wonder why there are missing numbers when you get the NEXTVAL of the oracle sequence? We’ll it turns out that the sequence cache is affecting this. Basically, your session is assigned with a range of numbers, say 20(default). So when you logout of your session and then login and hit the sequence again, you’ll have a gap of 20.
Read More →

One of our migration consultants is asking our Siebel Administrator as to why his sqlldr is not working as expected. I pitched in because I thought the problem is interesting. His problem seems trivial as he’s just trying to load a rather long string from his text file into a varchar2 field with a length of 1000. However, one of his records gets rejected even with only 340 characters in his input data.
Read More →

I got the error below recently and it’s quite new to me. One of the sites I usually visit for more details states that it’s an Oracle bug. But I am sure that the problem is on the script I was running and as explained in the site, the bug is more on the Oracle not displaying the correct problem. That makes this problem more difficult to trace.

ORA-01422: exact fetch returns more than one requested number of rows

Read More →

If you’re an adsense publisher, you might have noticed the scorecard the middle-right side of the Adsense screen. It gives us valuable insight on how to improve the performance of our website. and one of the persistent Red flag I see for the sites I manage is the image optimization problem. Fortunately, Google is not just showing you the problem because they also throw some recommenddations to address the problem.
Read More →

My desktop machine at the office got migrated to Windows 7 and I started having problem with quotes (both " and '). It requires me to press twice before the quotes are displayed. I said quotes because it will print out two quotes in the screen instead of just 1!!! It’s too annoying given that I use it gazillion times everyday and I am forced to do multiple keystrokes just to display one damn quote! Take note that it does not happen on my Windows 7 laptop, only the desktop. It’s too frustrating especially so that it hampers my productivity.
Read More →

So, one of my friends asked me if I can help him with this google doc spreadsheet he uses to track his stock portfolio. He only have 7 stocks right now but he finds it cumbersome to update the current price one by one so he’s thinking there might be a way to update the price automagically. In that way, he can immediately see how his stocks are doing for the day. I know google docs allows some kind of scripting and in-cell commands to retrieve information from the outside world.
Read More →