Solution for "Failed SQL queries"

Solution: as no unified timestamp format was used in production - it was decided to use only English environments from no on.
To prevent such things in future it was decided to always use to_timestamp functions and try to avoid localization specific notations.


sample DB structure


PRODUCT_ID (primary key)

CATEGORY_ID (primary key)

PRODUCT_ID (primary key, foreign key to PRODUCTS)
CATEGORY_ID (primary key, foreign key to CATEGORIES)
This will allow you to associate a product to more than one category, but not allow duplicates.


DB structure

I am trying to structure a database for optimal use. But I have no idea how to make that happen. Here is what i will have A category which will have many products and a count for each one of those products For example Restaurants will be the category and the products will be the computer system, cash register and each one of these products has a count so maybe there will be 2 cash registers and 3 computer systems and so on. Another category might be a bar, which might or might not have the same products. Then the user has the option of choosing a 2 restaurant package which might have a discount rate for getting all the products. anyone knows how the DB structure should be ?!


DB Export in Wordpress returns Empty file.

I have several tile to export DataBase from Wordpress site over phpmyadmin, and sometimes it would export, but more often it returns empty file. What can be the problem? This is very important to have backup of your site, and to be sure it is not empty file.


Connect R to a Postgresql database

I have got information in R which should be stored. Also querying and reloading the data should be possible.


Usage of SYS_GUID function

The function SYS_GUID of oracle databases provides this functionality. It can be applied according to the following example


How to create UUID inside Oracle

For the reason of unique identification of records in a database normally a unique integer value is sufficient. However, if records shall be exchange between databases a globally unique identification is required. UUIDs would be nice. But they shall be not created in a database Client but automatically inside the database.


A function shall be triggered within the database if a certain record is added to a table.

Creating module that accesses other website's database

A Drupal module could be created that is able to access another website's database and display the data.

Drupal even provides a way to use its database abstraction layer. In the settings.php an additional $db_url has to be defined as described here: http://drupal.org/node/18429

Using xampp with Windows 7 64 Bit

Xampp that I normally use for creating PHP-sites didn't worked at this computer with a 64 bit Windows 7. The Problem is that I needed it to make some changes in the source of a php-site and this with that new computer. First I had to install xampp which I did, but it didn't worked.


Subscribe to SQL