Deal of the Day

Friday, 1 July 2011

SQL400 for Beginners Part 4


Hi Guys,
I am back with Joins in SQL400. I hope till now you would have basic understanding of SQl400. After this blog, you would be able to know more on Joins.

SQL JOIN Statements

There are five types of SQL Joins
1.Inner Join
2.Left Outer Join
3. Exception Join
4. Cross Join
5. Multiple Join types in one Statement

SQL400 for Beginners Part 3

Hi Guys,
I am back with 3rd tutorial of SQL400. After going through this blog, I hope all of you would be having basic understanding of SQL400

SQL ORDER BY

‘ORDER BY’ is used to list the output in a particular order. This could be in ascending order, in descending order, or could be based on either numerical value or text value.

The syntax for an ORDER BY statement is as follows:
SELECT "column_name" FROM "table_name" [WHERE "condition"] ORDER BY"column_name" [ASC, DESC]

It is possible to order by more than one column.

ORDER BY "column_name1" [ASC, DESC], "column_name2" [ASC, DESC]

SELECT * FROM TBLSTR ORDER BY STRNAM

The above statement will select all records from file TBLSTR and sort them based upon the ascending values of column STRNAM

Thursday, 30 June 2011

SQL400 for Beginners Part 2


Hi Guys....

Welcome back… Today I would share more in SQL400….

Getting Started

Interactive SQL/400 can be run from the Command line. Invoke STRSQL {Start SQL/400} and get at what looks like another command line, where we can key in SQL statements for immediate execution, and/or use the F4 Prompt function to navigate IBM DB2/400 data base, which is a version of UDB




SQL CONCEPTS
•       Using basic SQL statements and clauses
•       The SELECT clause
•       Specifying a search condition using the WHERE clause
•       ORDER BY clause
•       Date/Time arithmetic
•       Creating and using ALIAS names
•       Creating descriptive labels using the LABEL ON statement
•       Describing an SQL object using COMMENT ON 

Wednesday, 29 June 2011

SQL400 For Beginners Part - 1

Hi Guys....Today i just thought of sharing something on SQL400 for beginners...

SQL Relational Database In the relational model of data, all data is perceived as existing in tables. DB2 UDB for AS/400 objects are created and maintained as AS/400 system objects.

AS/400 System Terms and SQL Relational Database terms
System Terms
SQL Terms
Library. Groups related objects and allows you to find the objects by name.
Collection. Consists of a library, a journal, a journal receiver, an SQL catalog, and optionally a data dictionary. A collection groups related objects and allows you to find the objects by name.
Physical file. A set of records.
Table. A set of columns and rows.
Record. A set of fields.
Row. The horizontal part of a table containing a serial set of columns.
Field. One or more characters of related information of one data type.
Column. The vertical part of a table of one data type.
Logical file. A subset of fields and records of one or more physical files.
View. A subset of columns and rows of one or more tables.
SQL Package. An object type that is used to run SQL statements.
Package. An object type that is used to run SQL statements.
User Profile
Authorization name or Authorization ID.