May 11, 2012

showing complete clob using sql; overcoming the 4000 Character limit in sql

I was working on a project; and needed create indexing using a BI tool. We store a lot of information in CLOB column (Oracle DB). As soon as I embarked on the project; I realized there was an issue. SQL has a 4000 char limit for result sets returned. And I can not set the session variables to increase the size. Therefore had to come with a creative way to get the result set out of the blob. So here it goes



SELECT ROWNUM as chunk_no,ID, SUBSTR (t1.clob_col, (ROWNUM-1)*4000, 4000) AS chunkFROM t1
CONNECT BY (ROWNUM-1)*4000 <= LENGTH(t1.clob_col)


This takes care of the issue; however there is a huge performance hit. If you know a tentative size that your data will not exceed; then you can do something like this:

SELECT SUBSTR (t1.clob_col, 1, 4000) AS pt1,
       CASE WHEN LENGTH (t1.clob_col) > 4000  THEN SUBSTR (t1.clob_col, 4001, 4000) END AS pt2,
       CASE WHEN LENGTH (t1.clob_col) > 8000  THEN SUBSTR (t1.clob_col, 8001, 4000) END AS pt3,
       CASE WHEN LENGTH (t1.clob_col) > 12000 THEN SUBSTR (t1.clob_col, 1201, 4000) END AS pt4FROM t1
credits: Kev for sharing some of the tricks 


Jun 7, 2007

Federal Reserve..A rip off.

How many of heard of these names?
Hambros, Barring, Selingman, Rothschild and Morgan.

Anyways these names represent the huge banking dynasty that control our federal reserve.
What do I mean by that?
Lets get a quick 101 as how we came to where we are today. For last last two and a half century when citizens of nations were busy winning freedom and democracy from their monarchs, the major Banking families of the world had a vested interest in nullifying the representative government. To go about doing these they set up behind the scene new dynasties to serve their interest in the form of financial giants.
This elite group learned and knew that all forms of government needed money in times of emergency and by providing these funds with special string attached, they could go about controlling represented government.
These elite group is also known in the main stream as International Bankers. Though it is represented by a huge group of Jewish families, it is by no means only a game played by them as many propose. It consist of Germans, English, Jewish and people of different origin and race.
These elite group in the main stream is known as the International Bankers.

These are not the banks that you deal with everyday, but they are mainly involved in dealing with Governments and the industrial giants of the world. The key to their success is to create a cloud around their control of the money of a nation and make it look like, the government of the nation is in control of the money. The key to this is create money out of nothing, and then lend it to government and then create interest out it; to say the least a very lucrative and a profitable transaction.

Now I can go in the technicality of how these is done, but I will leave the research for the hungry brain. For those who just want to read about it then during the 1800 two major families among these international bankers where located in USA.
One in New York headed by J.P Morgan and the other centered in Ohio headed by the Rockefeller & Co. When these two co-operated they could control the economic life of the country to a great degree which leads to control of the political life; at least at the federal level.

It was only matter of time and inevitable that the International Banking group will create a monopoly like the ones they has previously succeeded in Germany, England, France and many other European countries. Create a deception of government control when the real control is in private hands.

John D Rockefeller had purchased the ney your Chase bank and his brother William had bought the National Citi Bank of new York.

The Chase bank was later merged with Warburg Manhattan bank to form Chase Manhattan. Once of the biggest financial group in the world today. These groups later spent millions in government legislation that will grant a private franchise control over the nations money system. To sell this to voters these group created the propegenda that the new law will act against the current banking monopoly. And the politician took up the phrase "Banking Reform" and of course as all great act, to make things believable the banking families rejected the proposed solution but in reality financing the whole scheme from behind the scene.

One Dec 22, 1913; the Federal Reserve act was passed into law. This gave the birth to the Federal Reserve and with which the control of the money was given to the private hands. The treasury prints only money that the Federal reserve tells it to print. Now the Federal reserve is not a government agency and is beyond the reach of the voters.

Technically the stock of the Federal reserve is held by 12 privately owned national banks and that makes up the Federal reserve system. The key thing to know is that these banks are owned eventually by the International Banking dynasties I mentioned previously (For the hungry brain there is now room for research).

The 7 member of the Fed Reserve board are appointed by the president for the tenure of 14 years each. These members are there to ensure to create the illusion that people through their elected leaders have some voice and control over the national monitory policies. But till today not a single President has chosen a member that is not associated with the financial interest of the banking dynasty.

Now pay attention. If you have been reading carefully I had mentioned previously that these banking dynasties make interest of debt and not on money given. Well this is how it works. When the Federal government is in debt it borrows money from the federal reserve (controlled by the Banking dynasty); in reality no hard cash or gold is given.

The national debt today is more than 8 trillion. And just to make the basic payments or interest on this debt we the tax payers are forced (because you don't have a choice) to give more than 20 billion dollars. Well here is what it looks like in numbers $$$20,000,000,000. Now thats just the interest on money that was created out of nothing.

May 30, 2007

Capitalism, Consumerism

Many views have tried to come up in the last century; fascism, communism, democracy, religion (Islam), but only one has managed to creep up on top. It has challenged the very fabric of our society. Today it dictates who go to war with, who we call friend and who we call our enemy.
Consumerism, yes you have you heard it right.
Why?
Isn't Consumerism a high and posh way of saying Shopping. We all go buy things and we are consumers in that manner. So how is it bad. Well to understand what is bad in it, we have to get a little idea of how economics works in todays world.
In todays lame term, a economy is doing good, if we consume more and more every year. And everything is trying to convince us to consume more, advertisement bombardment. Buy this brand and not that brand, this is better and this is cheaper. In selling all this products they are selling us one sure thing; THE IDEA.
THE IDEA OF BUYING NEW THINGS and that our life would be somehow better if we have more and more things. Bigger home, bigger car, bigger and expensive things.

I have only come to notice this, when the other day I spent 60 dollars for a pair of shoes, that I did not need to begin with. I already have 2 pairs of shoes, and why did I need that brown shoe. Isn't it because they tell me I need it. My buddy every now and then calls me out to mall to take stroll. It has almost become our favorite pass time.
There is definately something wrong when our favorite pass time is walking around the mall and shopping centers. The devil in it is that it very seductive and its also very leathel.
We are shopaholics.

As consumers we dont really know what things really costs. If we dont demand things from India, for example mangoes and other things, then we dont have to worry about it. Just imagine the amount of fuel that was spent to get the magoes to USA. Each act of consumerism comes with a price tag to the environment weather you realize it or not. Now think about trees, Green house gases, the whole ecosystem is changing. And its all happening and happening through consumerism.

What has changed from the past that we have fallen pray to this. Well if you go back you will see power in the hands of very few and the similarly they being the major consumers of lavish things. The rest of the world was and poor and many of them did not care. Why? Well it was the fear of GOD.

Fear of God; religion told people not to focus on materials and to focus on spiritual and after life. When religion was the force in the past it set the trend.
During 17th century with new trade routes came new middle class and this unleashed an era of new middle class who liked the wealth and bragged their consumption. It was no longer a taboo to do so.
This brought about the philosophy of unleshing invidividual interest to move the economy forwards. By letting individual persue their worldly interest it will drive the economy faster and better. Came the existence of CAPITALSIM; with the help of consumerism.

Today consumerism tries to dictate who we should try to be like. What looks good and what does not look good. What you need to have to be part of the society. So if I refuse to buy new clothes because my old ones are still good then I have an outcast.
When the president of the most powerful country tells me to go Shop (Bush). I start to question what is behind all these shopping; and why is it important to the most powerful country in the world.

So is global terrorism the real big threat today, or is it consumerism. What will happen if a wave of ideas come out where people stop buying things they dont need, they stop shopping. What will happen to the world economy and super powers? What will happen to China, US and other consumer driven economies?

Trust me happiness is not how rich you are, today we have this relentless pressure to earn more and buy more and be better than someone else is self defeating. Feeling secure and good can not be solved by consumerism.

So for now there is no foreseen future rather than consumerism, but is there a way to redirect and change things. Can we get out of this and change our life style to get out of this economic machine.

Well I will tell you this my friend, the people that we give the power to make decisions on our behalf are not going to change it.

Apr 23, 2007

Pirates of Silicon Valley

Want to waste 1hr 36 min and and 50 seconds of your time then watch the tale of the 2 loons who claim to have ...... done what ever they say they did with the world.