Monday, July 17, 2017

Writing SQL Queries: Let's Start with the Basics


Summary: Learn to be more productive with SQL Server 2005 Express Edition with this quick introduction to the T-SQL language and the basics of getting information from the database using the SELECT statement.

Introduction

With the availability of ever more powerful programming tools and environments such as Visual Basic and Visual Studio.NET, as well as the availability of powerful database engines such as the free SQL Server 2005 Express Edition, more and more people find themselves having to learn the basics of SQL queries and statements. Sometimes they are professional developers who are experienced in other types of programming, and sometimes they are individuals whose expertise lies in other areas, but they suddenly find themselves programming database applications for fun and/or profit. If you fall into one of these categories, or are just curious about database programming, then this article is for you.
SQL Server 2005 Express offers you the opportunity to dive deeply into advanced databases and database applications, while still being free of charge. It is the same core database engine as all of the other versions in the SQL Server 2005, but it allows for easier setup and distribution all at no cost. It supports all of the advanced database features including, views, stored procedures, triggers, functions, native XML support, full T-SQL support, and high performance.
The purpose of this article is to lay out the basic structure and use of SQL SELECT queries and statements. These statements are part of Transact-SQL (T-SQL) language specification and are central to the use of Microsoft SQL Server. T-SQL is an extension to the ANSI SQL standard and adds improvements and capabilities, making T-SQL an efficient, robust, and secure language for data access and manipulation.
Although many tools are available for designing your queries visually, such as the Visual Database Tools that are available with Microsoft Visual Studio, it is still worthwhile and important to understand the SQL language. There is a real benefit to understanding what the visual tools are doing and why. There are also times when manually writing the necessary SQL statement is the only, or simply the fastest, way to achieve what you want. It is also an ideal way to learn how to use the full power of a relational database such as SQL Express.

Relational Databases: A 30 Second Review

Although there exist many different types of database, we will focus on the most common type—the relational database. A relational database consists of one or more tables, where each table consists of 0 or more records, or rows, of data. The data for each row is organized into discrete units of information, known as fields or columns. When we want to show the fields of a table, let's say the Customers table, we will often show it like this:
Bb264565.sse_qbasics_1(en-US,SQL.90).gif
Many of the tables in a database will have relationships, or links, between them, either in a one-to-one or a one-to-many relationship. The connection between the tables is made by a Primary Key – Foreign Key pair, where a Foreign Key field(s) in a given table is the Primary Key of another table. As a typical example, there is a one-to-many relationship between Customers and Orders. Both tables have a CustID field, which is the Primary Key of the Customers table and is a Foreign Key of the Orders Table. The related fields do not need to have the identical name, but it is a good practice to keep them the same.

Fetching Data: SQL SELECT Queries

It is a rare database application that doesn't spend much of its time fetching and displaying data. Once we have data in the database, we want to "slice and dice" it every which way. That is, we want to look at the data and analyze it in an endless number of different ways, constantly varying the filtering, sorting, and calculations that we apply to the raw data. The SQL SELECT statement is what we use to choose, or select, the data that we want returned from the database to our application. It is the language we use to formulate our question, or query, that we want answered by the database. We can start out with very simple queries, but the SELECT statement has many different options and extensions, which provide the great flexibility that we may ultimately need. Our goal is to help you understand the structure and most common elements of a SELECT statement, so that later you will be able to understand the many options and nuances and apply them to your specific needs. We'll start with the bare minimum and slowly add options for greater functionality.
Note: For our illustrations, we will use the Employees table from the Northwind sample database that has come with MS Access, MS SQL Server and is available for download at the Microsoft Download Center.
A SQL SELECT statement can be broken down into numerous elements, each beginning with a keyword. Although it is not necessary, common convention is to write these keywords in all capital letters. In this article, we will focus on the most fundamental and common elements of a SELECTstatement, namely
  • SELECT
  • FROM
  • WHERE
  • ORDER BY

The SELECT ... FROM Clause

The most basic SELECT statement has only 2 parts: (1) what columns you want to return and (2) what table(s) those columns come from.
If we want to retrieve all of the information about all of the customers in the Employees table, we could use the asterisk (*) as a shortcut for all of the columns, and our query looks like

Mental Technology Software for your Hardware (The Mental Laws)



Change your thinking, change your life with Mental Technology


People all over the world have been inspired by Barbara’s best-selling book The Road to Power / Fast Food for the Soul. But many are asking why the techniques in her book are so effective.

Mental Technology is Barbara’s answer to this important question. In this short but powerful book, Barbara explains how your thoughts are creating your reality. In simple language, Mental Technology describes the basic mental laws that govern the way the mind works and how you can take control of your thinking and of your life. Without understanding how your mind works, it is impossible to create the life you want to live.

Mental Technology is available in several languages including English, Swedish, Norwegian, Dutch, French, Czech and Icelandic. In some countries, the book is called “The 10 Mental Laws”. You can order the book here.

Click here to download The Mental Laws for free. http://www.beamteam.com/en/barbara/mentallaws.html

Words Of Wisdom For 2017 And Beyond


In years past I have asked marketing and business leaders for their predictions for the coming year. I have done so with the twist of infusing their prediction with a pop culture reference.
This year I decided to change things up a little. I've expanded my network to include influential people from other walks of life. Still incorporating pop culture I asked folks to provide me with the best piece of advice they have ever received OR they wish to pass onto others.  The example I gave was this quote from The Godfather II“Keep your friends close. But your enemies closer.” The advice or lesson you impart could be something like “Never lose sight of your competition. Stay close to them. Watch them. And yes, even learn from them - not just what to do but also what NOT to do."
One other twist this year is I have added my own take on each contribution.
Yes I realize this is not exactly an "end of the year" post as this could be done ANY time of the year but... just play along.

I have spent a good amount of my career in sales.  From business development at the street level to mass selling to selling my ideas inside a large organization. No matter what job you have and no matter your rank life throws many obstacles at you and hits pretty hard. Getting hit from time to time is inevitable, but you have to keep getting up and knocking on that next door, asking for the order, and believing in your ideas.  If you stay down after being hit you’ve lost. Get up and keep moving forward no matter what and you can win. - Randall Rozin, Global Director, Brand Management and Digital Marketing at Dow Corning
My take: This one strikes a personal nerve because of the Rocky reference. Randall is 1000% right of course in that we all get "hit" from time to time. But you simply must not let it keep you down. Keep moving forward. As Nike says, just do it.

My advice is don't spend too much energy revisiting what you said in a meeting, obsessing about that look on your boss's face and letting your own insecurities create a false narrative. The boss probably isn't sitting at home telling her husband about how you could have been more assertive in a meeting. They're probably making dinner and playing with their kids. Pay attention to the real signals and stop obsessing over yourself. - Denise Karkos, CMO TDAmeritrade
My take: Focus on what really matters is how I translate this. Denise is spot on when she says "stop obsessing over yourself." Don't overthink it. Once again, just do it.
###
Always stay humble and kind" from the song Humble & Kind by Tim McGraw- Jane Abell, Chairwoman of the Board, Donato's Pizza
My take: Very straightforward advice here from Jane. If you stay humble and kind, karma will be on your side and trust me, that's a very good thing.
###
You're broken down and tired, of living life on a merry go round...
And you can't find the fighter, but I see it in you so we gonna walk it out... And move mountains" from the song Rise Up by Andra Day
On our teams, and throughout our organization, we believe we have the opportunity, responsibility and honor to use our platform of sports and entertainment to change the world. One of our Corporate Values, “Move Mountains” suggests as much. We take that commitment and pledge very seriously; contributing more than 25,000 volunteer hours annually in the communities where our fans live, work and play surrounding Philadelphia and Newark, NJ.



Could some old tech be better than new tech?

*One of the nieghbors I haven't seen in a few years stopped by the other day and asked had I gone shopping. I said no, why? She said that the salad looks so fresh so I shared my secret.

 When I purchase my produce, inexpensive paper towels are thrown into the bag from day 1. When I'm here I see the commercials for all the 'veggie crispers and whatnot, this doesn't require all that.
Zip lock bags or plastic bags, who cares, paper towels, news paper (As long as it doesn't bleed ink) who cares.
 The only important thing is that whatever you use absorbs water. Moisture kills vegetables before age.


Peppers (Romain Lettuce and other veggies  packaged the same)


7 to 12 days in fridge? (I've been doing this so long I no longer count)

 And finally we have Teryaki chicken with a Nicaraguan based side (Forgot the name) and a plain jane salad.



Have a great night.

*I would share more of my own "strategies" yet I have a very bad habit of skipping chunks of information. I tend to think others can grasp what I'm speaking about without details.

As the owner of Sys Nica, let me share my latest

*I puchased 7 garbage cell phones and 1 optics kit (The optics kit was destroyed in the process). This is a demonstration of phone #6 > a complete hybrid.


Original


Hybrid


Original


Hybrid


I don't want to keep up with a little clip.

11 Reasons Why Linux Is Better Than Windows

*It really is, yet it has its limitations. When I build a POS or CR, they're always Linux based.



Brief: Are you wondering if Linux is better than Windows? Don’t wonder. Linux is better than Windows and in this article, we’ll see the advantages of Linux over Windows.
If you are not a power user, it might seem that “Windows” OS is a better (or easier) choice when compared to Linux. In either case, if you are not enjoying using a Linux distro then Windows would be your obvious choice.
However, in reality, we tend to experience something different, which lets us jump to the conclusion where Linux gets the edge over Windows OS.

Advantages of Linux over Windows

In this article, we will take a look at 10 of the compelling reasons why Linux is better than Windows. Some of the points mentioned here are already discussed in our earlier article on why switch to Linux.

1. Open Source Nature

What is it like when you buy a car, but you cannot see what’s under the hood? Similar is the case with when you use a Windows-powered system.
However, in contrast, Linux is completely an open source project. You can have a look at the source code of a Linux OS, which is a plus.
I know, most people don’t care about this openness of Linux, but to me, this is the most important feature of using GNU/Linux.

2. Secure

Let’s face it; Windows OS is vulnerable to different types of attacks (or hacks). However, Linux is not as vulnerable as Windows. It sure isn’t invulnerable, but it is a lot more secure. Although, there’s no rocket science in it.
It is just the way Linux works that makes it a secure operating system. Overall, the process of package management, the concept of repositories, and a couple more features makes it possible for Linux to be more secure than Windows.
When you have Windows installed, you need to download/purchase an Antivirus program to keep your computer safe from hackers and malware. However, Linux does not require the use of such Anti-Virus programs. Of course, a couple of software tools still exist to help you keep your system free from threats, but it is often unnecessary when you have a Linux system.
Being secure by nature would make things easier for you and save money as well because you will not have to get a premium Antivirus software!

3. Can revive older computers

As the operating systems evolve, so do their hardware requirements increase exponentially. For instance, if you purchase a genuine copy of Windows 10, you will have to meet the minimum hardware requirements to run it successfully, and you cannot run it on just about any low-end system.
Nevertheless, with Linux, you could even utilize one of your oldest computer systems to achieve a task. However, that does not mean that every Linux distribution would work with 256 MB of RAM coupled with an outdated processor. However, there are options which you can install on such low-end systems as well (such as Puppy Linux).
So, being an efficient OS, Linux distributions could be fitted to a range of systems (low-end or high-end). In contrast, Windows operating system has a higher hardware requirement.
Overall, even if you compare a high-end Linux system and a high-end Windows-powered system, the Linux distribution would take the edge. Well, that is the reason most of the servers across the world prefer to run on Linux than on a Windows hosting environment.

4. Perfect For Programmers

Linux supports almost all of the major programming languages (Python, C/C++, Java, Perl, Ruby, etc.). Moreover, it offers a vast range of applications useful for programming purposes.
The Linux terminal is superior to use over Window’s command line for developers. You would find many libraries developed natively for Linux. Also, a lot of programmers point out that the package manager on Linux helps them get things done easily.
Interestingly, the ability of bash scripting is also one of the most compelling reasons why programmers prefer using Linux OS.
Linux also brings in native support for SSH, which would help you manage your servers quickly. You could include things like apt-get commands which further makes Linux one of the most popular choices of the programmers.

What the U.S. can learn from India’s move toward a cashless society



Silicon Valley fancies itself the global leader in innovation. Its leaders hype technologies such as bitcoin and blockchain, which some claim are the greatest inventions since the Internet. They are so complex that only a few mathematicians can understand them, and they require massive computing resources to operate — yet billions of dollars are invested in them.
India may have leapfrogged the U.S. technology industry with simple and practical innovations and massive grunt work. It has built a digital infrastructure that will soon process billions more transactions than bitcoin ever has. With this, India will skip two generations of financial technologies and build something as monumental as China’s Great Wall and America’s interstate highways.
A decade ago, India had a massive problem: nearly half its people did not have any form of identification. When you are born in a village without hospitals or government services, you don’t get a birth certificate. If you can’t prove who you are, you can’t open a bank account or get a loan or insurance; you are doomed to be part of the informal economy — whose members live in the shadows and don’t pay taxes.
In 2009, the government launched a massive project, called Aadhar, to solve this problem by providing a digital identity to everyone based on an individual’s fingerprints and retina scans. As of 2016, the program had issued 12-digit identification numbers to 1.1 billion people. This was the largest and most successful I.T. project in the world and created the foundation for a digital economy.
India’s next challenge was to provide everyone with a bank account. Its government sanctioned the opening of 11 institutions called payment banks, which can hold money but don’t do lending.  To motivate people to open accounts, it offered free life insurance with them and made them a channel for social-welfare benefits.  Within three years, more than 270 million bank accounts were opened, with $10 billion in deposits.
And then India launched its Unified Payment Interface (UPI), a way for banks to transfer money directly to one another based on a single identifier, such as the Aadhar number.
Take the way that credit-card payments are processed: When you present your card to a store, the cashier verifies your signature and transmits your credit-card information to a billing processor such as Visa, American Express or MasterCard — which works with the sending and receiving banks. The billing processors act as a custodian and clearing house. In return for this service, they charge the merchants a fee of 2 to 3 percent of the transaction. This is a tax that is indirectly passed on to the customer.
There is no technology barrier to prevent a UPI from working in the United States. Transfers would happen within seconds, even faster than the 10 minutes that a bitcoin transaction takes.
India has just introduced another innovation called India Stack.  This is a series of secured and connected systems that allow people to store and share personal data such as addresses, bank statements, medical records, employment records and tax filings, and it enables the digital signing of documents. The user controls what information is shared and with whom, and electronic signature occurs through biometric authentication.
Take the example of opening a mobile-phone account. It is cumbersome everywhere, because the telecom carriers need to verify the user’s identity and credit history. In India, it often took days to produce all the documents that the government required. With the new “know-your-customer” procedures that are part of India Stack, all that is needed is a thumb print or retina scan, and an account can be opened within minutes. The same can be done for medical records. Imagine being able to share these with doctors and clinics as and when necessary.  This is surely possible for us in the United States, but we aren’t doing it because no trusted central authority has stepped up to the task.
Complete article > http://tinyurl.com/y7984kye

Can technology save the environment?

*Nice question, "I speed read / read in chunks instead of sentences and paragraphs. If I question anything, I go back.


In a world of 9 billion expected by 2050 – including 3 billion new middle-class consumers – the challenges of expanding supply to meet future demand are unprecedented. The World Business Council for Sustainable Development(WBCSD) and the Global Footprint Network estimate that we have far exceeded the Earth’s capacity to sustain our current levels of consumption and that in the very short term we are on track to consume the equivalent of more than twice what our planet can regenerate; the United States is consuming up to five times that level.
The environmental impacts are clear; the list is vast, well  known and depressing.  Climate change is one of them and its here with us and here to stay. Deniers are few and far between funded by special interests lobbying politicians and being extremely successful at it. Inaction has been the result, with endless meetings yielding the same result – nothing.
However, the tide may be changing. Both the understanding of the issues and the impacts are evident for a globally connected society.
Much of our challenges spring from a wasteful developmental philosophy, our current “take-make- dispose” model in the fast-moving consumer goods sector alone leads to a total value chain waste of 80% or $2.5 trillion per year. And in the manufacturing sector the figure could be as high as 90% with packaging thrown away being one of the biggest culprits.
In agriculture and food production the opportunity is enormous, both economically and morally. One -third of all food produced for human consumption is lost or wasted before it is eaten, the UN’s Food and Agricultural Organization estimates that this equals to  $750 billion. In the US, 40% of all produce is not eaten – and it’s projected that it also generates up to 10% of all greenhouse gases. Just in Europe 100 million tonnes are thrown away each year. This is not only an economic issue, but also an insult to humanity when over 840 million people go hungry each year.
Relying on efficiency gains alone will not be enough to meet global demand: the context calls for systemic changes, and in that respect the switch from a linear to a regenerative circular economy provides interesting options. The circular economy aims to eradicate waste – not just from manufacturing processes, as lean management aspires to do, but systematically, throughout the life cycles and uses of products and their components.
Within this economic model, designing durable goods to be restorative will keep components and products in use for longer, while ensuring that biological materials can re-enter the biosphere at the end of their life will contribute to safeguarding soil productivity.
In a circular economy, the goal for durable components, such as metals and most plastics is to reuse or upgrade them for other productive applications through as many cycles as possible. This approach contrasts sharply with the linear mindset embedded in most of today’s industrial operations. Even their terminology – value chain, supply chain, end user – expresses a linear take–make–dispose view. Ultimately, the circular economy could decouple economic growth from resource consumption. The World Economic Forum, in partnership with the Ellen MacArthur Foundation and McKinsey, forecasted savings of up to 40-50% by utilizing these production models. The potential for innovation, job creation and economic development is huge: estimates indicate a trillion dollar opportunity.
If we believe half of Peter Diamandis predictions about an abundant world and that exponentially growing technologies will enable us to make greater gains in the next two decades than we have in the previous 200 years, we could soon have the power to exceed the basic needs of humankind.
Abundance for all could be within our grasp: Dean Kamen’s “Slingshot”, a technology which can transform polluted water, salt water or even raw sewage into high-quality drinking water for less than one cent a liter; the Qualcomm Tricorder which promises a low-cost, handheld medical device that allows anyone to diagnose themselves better than a board certified doctor; Despommier’s “vertical farms” which replaces traditional agriculture with a system that uses 80%less land, 90% less water, zero pesticides and transportation costs. And other emergent technologies such as Machine-2-Machine Communication, mobile technology, advances in nanotechnology, life and material sciences all provide an array of options for optimizing our production technologies to minimize waste.
Also, evolving business models that alter not just how we produce, but how we consume have the potential for major disruption. “Pay for Service/rental businesses” under which Philips, for example, introduced the “Pay per lux” model, where they maintain ownership of the materials (light bulbs), and sells light as a service and other models such as “sharing economy businesses” (Uber, AirBnB) and fractional ownership businesses (Netjets) have the potential to maximize the utilization of assets, meet the demand for products and services without adding waste and unnecessary consumption.
Clearly, continuing down the path we are in is not an option our planet can sustain. We must mitigate and restore the capabilities of our environment to sustain us and future generations. In how fast, widespread and effectively these new business models and technologies are deployed lies much of the answer to the challenge. And whether this is cause for optimism I am in no position to say.
This is part of a series of posts marking the 10-year jubilee of the World Economic Forum’s community of Young Global Leaders.
Author: Leo Schlesinger is the Chief Executive Officer of MASISA México and a World Economic Forum Young Global Leader.
Image: The sun is about to come up over the South Pacific Ocean. NASA/Handout via Reuters

High Tech Commercial

*I lied. Enjoy before I go back into it. What? You didn't think men like me had a sense of humor?


Future Concept Weapons




















Future Concept Motorcycles

















Featured Posts

Rental Properties for Sale, Santa Marianita, Ecuador

  Beautiful rental with beach access. Utilities and WiFi are included, just bring your food and move in. *Be sure to ask about our long-term...

Popular Posts