Jul 01

[Microsoft][ODBC driver for Oracle][Oracle](#0)[Microsoft][ODBC Driver Manager]Driver’s SQLSetConnectAttr failed IM006 0 [Microsoft][ODBC Driver Manager] Driver’s SQLSetConnectAttr failed (#0)

Database, Tips by Imam | No Comments »

OS :
Windows XP

Office :
Access 2007, Access 2003, Office XP dan sejenisnya.

Problem :
Ketika ingin melakukan impor atau link menggunakan ODBC dari Access ke Oracle. Memang pada drivers Oracle in OraHome tidaklah harus ada, karena pada sebagian pc yang terinstall Oracle Client dengan menu Run Time dapat menjalankan driver Microsoft ODBC for Oracle. Namun pada kasus ini jadi sedikit berbeda…

Popularity: 2% [?]

Mar 01

Filtering with WHERE

Database by Imam | 1 Comment »

The WHERE clause is a row filter that is used to restrict the output of rows (or tuples ) in a result set. When the WHERE clause is used, the SQL Server database engine selects the rows from the table for the result set that meet the conditions listed in the WHERE clause. So, as we have previously illustrated, if no WHERE clause is used in a query, the query will return all rows from the table.Following is the general syntax of a SELECT statement with a WHERE clause:

SELECT column-names
FROM   Table
WHERE  criteria

For example, consider the following query:

Popularity: 8% [?]

Mar 01

Displaying or SELECTing Rows or Tuples from a Table

Shout by Imam | No Comments »

In relational database terminology, a table is called a relation, and is denoted by the name of the relation followed by the columns (or attributes), as shown here:

Dependent(pno, dname, relationship, sex, age)

Popularity: 8% [?]

Feb 22

The SELECT Statement

Database by Imam | No Comments »

The SELECT Statement

The first SQL command you will learn, and the one you will use most frequently, is SELECT. In this lesson, you begin by learning how to fetch data records from a single table.

A SELECT statement begins with the SELECT keyword and is used to retrieve information from MySQL database tables. You must specify the table name to fetch data fromusing the FROM keywordand one or more columns that you want to retrieve from that table.

Keywords and Statements

A keyword is a word that is part of the SQL language. In the examples in this book, SQL keywords are always written in capitals, although they are not case sensitive.

A SQL statement begins with a keyword and can contain several more keywords that must appear in the correct, structured wayknown as the statement’s syntax.

Popularity: 9% [?]

Feb 20

Conditional Functions in MySQL

Database by Imam | No Comments »

MySQL also includes a set of functions that return their result based on a condition, just like the conditions you use in a WHERE clause.

TRUE and FALSE
Every condition returns a value, TRUE or FALSE, depending on whether the condition is satisfied. There is no Boolean data type in MySQL TRUE equates to 1, and FALSE equates to 0.

You can actually see these values by executing a condition as a query, as follows:

mysql> SELECT code, price, price > 10.00
-> FROM products;
+——+——-+—————+
| code | price | price > 10.00 |
+——+——-+—————+
| MINI | 5.99 | 0 |
| MIDI | 9.99 | 0 |
| MAXI | 15.99 | 1 |
+——+——-+—————+
3 rows in set (0.00 sec)

The output from this query shows each product and its price from the products table. The conditional column returns TRUE when the price is greater than 10.00.

Popularity: 8% [?]

Feb 19

Numeric Functions in MySQL

Database by Imam | No Comments »

A function is a MySQL command used in an SQL statement that takes one or more arguments and returns a value based on the values supplied. Just as with expressions, you can use a function anywhere a fixed value could otherwise be used, or to manipulate the value returned in a database column.

Case Sensitivity
Function names are not case sensitive in MySQL. For example, you can use ROUND(), Round(), or round()these all perform the same function call.

Arguments
To pass a function more than one argument, separate the values in parentheses using a comma. If a function does not require any arguments, the parentheses must still be givenfor instance, RAND().

Random Numbers
To generate a random number, use the RAND() function with no arguments. The result is a random decimal number between 0 and 1.

Popularity: 8% [?]

Feb 18

Numeric Operators in MySQL

Database by Imam | No Comments »

Numeric operators are used in a similar waytwo values appear on either side of a symbol or a sequence of symbols. This expression equates to a new value in the SQL statement.

Operators and Operands
In the expression a + b, the + symbol is the operator and a and b are known as operands.

Using Arithmetic Operators
An expression that uses a numeric operator can be used in a SQL statement anywhere that you could otherwise put a numeric value. You can also use a numeric operator to modify retrieved data from a table, as long as it is numeric data.

You can actually perform a query in MySQL without supplying a table name. This is useful only when you have an expression as a selected value, but it can be used to show the result of an expression on fixed values.

Addition in MySQL is performed using the + operator, and subtraction using the - operator. The following query shows an expression using each of these operators:

mysql> SELECT 15 + 28, 94 - 55;
+——– +———+
| 15 + 28 | 94 - 55 |
+———+———+
| 43 | 39 |
+———+———+
1 row in set (0.00 sec)

A query with no table list returns exactly one row but can contain multiple columns. In this example, the two columns returned contain the results of the two expressions in the

SELECT statement.

The other basic arithmetic operators in MySQL are * and /, for multiplication and division, respectively. The / operator in MySQL returns a decimal numberit does not truncate the result or round it to the nearest whole number.

mysql> SELECT 6 * 8, 72 / 9, 2 / 3;
+——-+——–+——-+
| 6 * 8 | 72 / 9 | 2 / 3 |
+——-+——–+——-+
| 48 | 8.00 | 0.67 |
+——-+——–+——-+
1 row in set (0.00 sec)

Popularity: 7% [?]

Jan 14

Function

Database by Imam | No Comments »

Function

User Defined Function (UDF) merupakan kumpulan code Transact SQL , yang dapat memuat parameter, dan return value, atau table.
UDF Type:
- Scalar function  nilai kembaliannya berupa single value.
- In Line Table functions mengembalikan variabel dalam bentuk single table yang dibuat oleh statement SELECT.
- Multi-statement Table Function. Function ini mengembalikan variabel table yang strukturnya dibuat secara manual, mirip dengan statement untuk membuat table. Type fungsi ini digunakan untuk manipulasi data yang kompleks didalam function.

Popularity: 6% [?]

Dec 05

ADO and DAO

Shout, Study by Imam | No Comments »

As stated earlier, ADO and DAO are the two primary methods of data access. For the purposes of connecting to a data source and simply extracting data, the two may be used interchangeably. According to Microsoft, DAO was designed specifically for the Microsoft Jet database at the heart of Access, but it is still able to access other databases while taking a performance hit. There are also some differences in features when it comes to making changes to a data source (adding tables, fields, etc.) and performing more complex query functions, such as data shaping, turning the query result into XML, and using cursors. I generally use DAO when dealing with Access (Jet) databases and ADO when dealing with SQL Server or other databases.

If you have done any work in Microsoft Access, you are probably familiar with queries . When you build a query in the design mode in Access, you are really making a graphical representation of the SQL. To see how this works, you can change the query view in Access to SQL View and see what this looks like.

Popularity: 7% [?]