1. Humans shall make no law respecting an establishment of boundaries or prohibiting the free exercise therein, or abridging the freedom of access, or the right to peaceful assembly.
In other words:
The cat is entitled to go outside any time s/he wants.
Winter in Poland is cold - it is -20°C today and the rivers and lakes are frozen over. Hot food helps and was thus consumed. I hope I am wrong, but it appears to me that Polish cuisine consists of cabbage, cabbage, cabbage, potatoes and some meat. And large dill pickles. This is what lunch today suggested in any case: I had 3 different types of cabbage piled high onto my plate - red cabbage, cole-slow and sauerkraut - by a lovely little old lady in the local eatery who thought I lacked essential gasses.
A horse walks into a bar and orders a pint of ale, The barkeeper says: "You're in here quite often, do think you might be an alcoholic?", "I don't think I am", said the horse, and then vanishes out of existence.
You see, the joke is about Descartes' philosophy of "I think, therefore I am, I am, therefore I think", but to explain this before the joke would be putting Descartes before the horse.
Bishop Berkeley espoused the school of thought called Idealism, which went along the lines of: "To be, is to be perceived". One fyne day he dreamt the following conundrum up: "If a tree falls in the forest and no one hears it, does it make a sound?" The implication is that if no one perceives the event, not only does the tree not make a sound, but the tree does not even exist.
This is, of course, a load of old rubbish. The good Bishop can't do me for defamation since he ceased being perceived in 1753. Had he lived in today's more cynical world, he may well have come up with more relevent thought-experiments to illustrate the philosophy of Idealism, thus:
It's nearly 35 years now that I have been in the software production and integration business! As an IT consultant, I have witnessed the inner workings of many types of businesses that claim to have a working software development and integration division.
Way back then, people got into software because some part of their business had to be automated: The typical accountant sooner or later got tired of doing the monthly book runs on accounting-ruled paper and managed to partially automate it by putting the business transactions in a giant spreadsheet. Over time, the accountant got more sophisticated and used multiple sheets for the spreadsheet, congratulated himself for writing his first Excel/Quattro/Lotus123 macro and then had a go at writing the process in BASIC, DBASE or CLIPPER with no projecting background and little understanding of user interface design. Because of the never-ending list of bugs, the control of the program development was fiercely protected by the originator, which endowed a sense of personal ownership over the program that would have been unheard of today. Rolling forward through many painful corporate evolutions to the present, we have developed the good common sense to abstract ourselves from these automations and sever the personal relationship that we have with what are essentially just invisible robots that provide a service. We even trust these services to run on machines that are not our own and that are located in places that we do not care where, and for which we only pay for on a per-use basis.These services are hosted on infinitely-capable machines of which the interfaces are are very quick, reliable, documented, well-understood and highly secure. At last we have way to successfully deliver software-based automation solutions! It is just that some people in the business have not evolved as quickly...
... without destroying the database.
You can do it all in the shell:
- Create a SQL script from the database to drop all the tables
- Execute the SQL script against the database
mysql -u[pwd] -p[user] [dbname] -s -e 'show tables' | sed -e 's/^/drop table /' -e 's/$/;/' > dropalltables.sql
mysql -u[pwd] -p[user] [dbname] < dropalltables.sql
A quick and dirty way of stripping duplicate records out of a MySQL table!, if your table has no indexes or constraints:
Assuming the name of the offending table is customers:
CREATE TABLE customer_dedupe AS SELECT DISTINCT * FROM customers;
RENAME TABLE customers TO customers_dupe;
RENAME TABLE customers_dedupe TO customers;
But what if your original table had indexes?
The task of matching strings between heterogeneous systems, especially that of matching personal or company names or addresses, is not easy with SQL Server's limited set of built-in string SQL functions. Here is a C# CLR-Assembly (with source code) for SQL Server with some advanced string-handling functions that may help:
LTrim - like Oracle's LTRIM function.
InitCap - like Oracle's INITCAP function
FlattenCharSet - Replace western characters with diacritics with best-choice, non-diacritic characters
StripPunctuationMarks - Remove all punctiation marks from the given string.
Page 1 of 2