Does Sybase support string types that it doesn’t right trim?

Yes.

Sybase

For char columns to be fixed length, you must use the not null attribute.

For variable length columns, use varchar or char with a null attribute.

Then to measure the real data size including trailing spaces use the datalength function not the len function nor the charlength function.

Good SQL, good night.

stackoverflow

Death to the Death Star

Recently a White House Petition at the “We The People” website received the required 25,000 signatures.  This particular petition asked for the government to build a Death Star by 2016 to boost job creation and bolster national defense.

deathstar

Because it received the required signatures, the White House had to respond. Thus Paul Shawcross, Chief of Science and Space at the White House Office of Management and Budget, formulated the following reply.

  • Financially
    • It costs $850,000,000,000,000,000
    • We need to reduce the budget not expand it.
  • Morally
    • The Administration does not support blowing up planets.
  • Practically
    • It is a flawed concept – can be exploited by a one-man starship.

Evidently the answer is no.  Maybe the next Administration will be more lenient.

Sybase Functionality

QUESTION:

Does anybody know if Common Table Expressions and User-defined functions (not from Java) are supported in Sybase?

ANSWER:

Microsoft SQL Server is based on Sybase 7.0. Sybase may not have Common Table Expressions (CTE) and User-Defined Functions, but there are equivalent ways to do the same thing.

For example CTE can be done either in nested queries or via temp tables using a number sign (#) in front of the table name.

For User Defined Functions, create a stored procedure with simple SQL code and call it via the exec function for example “exec my_sql_code”. This allows nesting of stored procedures.

Good SQL, good night.

NOTE TO BANKS – A Prepaid Gift Card is NOT A Debit Card

Several times I have received a gift card or a prepaid card that clearly says “DEBIT CARD” on the card above the VISA or MasterCard logo.  But NOOOO…..

giftcard

When I go to use it I have to say it is a Credit Card because it does not have a pin number.

Why don’t the banks put the following on the card?

PREPAID CARD (use like Credit Card)

You would think the banks making billions of dollars a year could figure this out.

January Caption Contest Entry

2013_01_caption

SCOTTY, BEAM US UP!

Occupy This – Stop Robocalls

stoprobocalls

The other day I gave an impromptu speech at my Toastmasters club.  I started out by asking how many people knew about Citizen’s United.  One hand was raised.

Then I asked how many people knew about robocalls.  Nearly every hand was raised.

That summarizes how limited the marketing campaign is for reversing Citizen’s United and approving a 28th Constitutional Amendment to do so.  People just don’t have the time to understand the ramifications of the Supreme Court ruling in the Citizen’s United case.

We have a better chance of passing a 28th Amendment and make change if we concentrate on something most people hate.  Yes you got it – robocalls.

Henceforth, we need to call the 28th Constitutional Amendment the Political Robocall Amendment.

wethepeople

I learned the other day that England actually allows their political campaigns to last only one month.  What a concept.  But I am setting my sites on larger fish than a one month time limit.

I am targeting the Super PACs, and the out of control campaign spending by the rich .003 percent of the population, and the enormous amounts of political television ads and of course the ginormous numbers of robocalls by politicians. I have had enough and I am not going to take it any more.

There are plenty of people and cities that feel the same way.  There are hundreds of websites supporting a 28th Constitutional Amendment.  I agree with them because it is the only way to reverse Citizen’s United. But there are at least 20 proposed versions.   Most concentrate on the following two issues:

1. corporations are not people or citizens

2. money is not free speech.

We need to get down to one version.  The MoveToAmend.org version appears to have the most support.  It is rather simple as most approved amendments tend to be.  But I have several concerns.

One concern is the need to define citizens as individuals and restrict ONLY corporations.  Instead we need to restrict ALL groups of people, whether they are corporations, for-profits, non-profits, unions etc.  If we restrict one group, money will flow to others.

Another concern is saying money is not free speech.  This is like trying to train your dog to not poop on the carpet by trying to train it to not poop at all.  In other words, we will have more success if we limit campaign spending to individuals and a certain amount rather than trying to eliminate money as free speech.

Likewise, I hate to say it, but we will never get rid of all robocalls, but we can limit them.

political_robocall_amend

Here is my attempt at an amendment which indirectly eliminates Super PACs and greatly reduces robocalls.

1. Each citizen is a person as defined in the Constitution with human rights and these rights are not granted to artificial groups of people.

2. Campaign contributions shall be allowed only by citizens and the amount per citizen per election shall be determined by Congress.

Here is a book about this very subject.

http://www.kickstarter.com/projects/804567260/2033-the-20th-anniversary-a-book

Also please support MoveToAmend.org to greatly reduce robocalls.

I Love MOCA – Massive Online Class Accreditation

I love the chocolate flavor, the rich whipped cream and in some cases the kick from the coffee.  But wait…

mocha

This post is about another MOCA – Massive Online Class Accreditation.

 

 

 

Massive Open Online Classes (MOOCs) are not going to be fully accepted until they are accredited.

 

 

 

 

MOOCs have so many advantages including 1. taking pressure off trying to have fewer students per teacher, 2. allowing slower students to take the class at their own pace or repeat it, 3. improving the quality of education by using the best motivational teachers and 4. the number one reason – reduce costs.

Costs are reduced because you need fewer resources including brick and mortar and fewer teachers.  Now I know this really upsets the teacher unions but the long-term goal is to improve education and put the United States back on top of the world in terms of quality of education.

The good news is accreditation has already started at several colleges as seen at this website – http://chronicle.com/article/MOOCs-Take-a-Major-Step/135750/

If At First You Don’t Succeed, Try Try Again – I Mean Secede

Another reason we need to rethink our education system.

What’s In A Name When It Comes To Good BBQ?

[Please read the following with a Georgia accent.]

Recently I was in Warner Robins, Georgia on business.  Just outside the Robins Air Force Base was a barbecue restaurant.  It had some of the best tasting, melt in your mouth, smoky flavored barbecue I have ever eaten in every single bite.

Over the years, I have been to a number of great barbecue places.  They usually are shacks with faded wood on the sides and rusty tin roofs.  They all look like they would burn down if the cooks took their eyes off the fire for only a second and an amber escaped.

But what got me was the name of this larger than usual restaurant in Georgia with the outside painted red.  Since the owner was well known in the area for his barbecue, it makes sense for him to name it after himself.  That is why the restaurant has a large pink neon sign with the name “Martin’s BBQ”.

But I maintain, from an outsider’s point of view, that the name just does not have a great ring to it.  I like the name “Leroy’s BBQ”.  Now that is a name that reeks of barbecue, don’t you think?

Why Education Needs To Change

This is just one reason why education must change.

We need to seriously look at how to improve education in the United States in order to offer a World Class education.  Here are some futuristic ideas.

1.  Decide to concentrate on quality not quantity.  Instead of smaller class sizes which means more teachers, let’s concentrate on better teachers.

2.  Collect and catalog all the best videos of teachers.  We need to focus on the best of the best videos and teachers that motivate.

3.  Allow vouchers to be used.  Parents will pick the best schools which will encourage all schools to get better via supply and demand.

4.  Meet in classes for group or team projects as well as testing.  Students will want to socialize and test scores can be verified.

5.  Encourage service for student grants.  Do military or community service in exchange for student grants or loans.

Let’s make some positive change.  Here is more information.

http://www.futuresearch.com/futureblog/2010/09/01/why-education-must-change/