-->

Wednesday 30 April 2014

A Guide for Beginners to learn Structured Query Language (SQL)

Structured Query Language (SQL)

SQL is a standard language for accessing and manipulating databases.


What is SQL?

  • SQL stands for Structured Query Language
  • SQL lets you access and manipulate databases
  • SQL is an ANSI (American National Standards Institute) standard


What Can SQL do?

  • SQL can execute queries against a database
  • SQL can retrieve data from a database
  • SQL can insert records in a database
  • SQL can update records in a database
  • SQL can delete records from a database
  • SQL can create new databases
  • SQL can create new tables in a database
  • SQL can create stored procedures in a database
  • SQL can create views in a database
  • SQL can set permissions on tables, procedures, and views

SQL is a Standard - BUT.... Although SQL is an ANSI (American National Standards Institute) standard, there are different versions of the SQL language.

However, to be compliant with the ANSI standard, they all support at least the major commands (such as SELECT, UPDATE, DELETE, INSERT, WHERE) in a similar manner.


Using SQL in Your Web Site

To build a web site that shows data from a database, you will need:
  • An RDBMS database program (i.e. MS Access, SQL Server, MySQL)
  • To use a server-side scripting language, like PHP or ASP
  • To use SQL to get the data you want
  • To use HTML / CSS

RDBMS

RDBMS stands for Relational Database Management System.

  • RDBMS is the basis for SQL, and for all modern database systems such as MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.
  • The data in RDBMS is stored in database objects called tables.

Database Tables

A database most often contains one or more tables. Each table is identified by a name (e.g. "Customers" or "Orders"). Tables contain records (rows) with data.

In this tutorial we will use the well-known Northwind sample database (included in MS Access and MS SQL Server).

Below is a selection from the "Customers" table:

CustomerIDCustomerNameContactNameAddressCityPostalCodeCountry
1Alfreds FutterkisteMaria AndersObere Str. 57Berlin12209Germany
2Ana Trujillo Emparedados y heladosAna TrujilloAvda. de la Constitución 2222México D.F.05021Mexico
3Antonio Moreno TaqueríaAntonio MorenoMataderos 2312México D.F.05023Mexico
4Around the HornThomas Hardy120 Hanover Sq.LondonWA1 1DPUK
5Berglunds snabbköpChristina BerglundBerguvsvägen 8LuleåS-958 22Sweden

The table above contains five records (one for each customer) and seven columns (CustomerID, CustomerName, ContactName, Address, City, PostalCode, and Country).

Ref: http://www.w3schools.com/sql/sql_syntax.asp

SQL Statements


Most of the actions you need to perform on a database are done with SQL statements.
The following SQL statement selects all the records in the "Customers" table:

SELECT * FROM Customers;
The above Query will list all the Rows & Columns in the Database Table.

Simulator: http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all


Keep in Mind That...

SQL is NOT case sensitive: select is the same as SELECT
In this tutorial we will write all SQL keywords in upper-case.

Semicolon after SQL Statements?

  • Some database systems require a semicolon at the end of each SQL statement.
  • Semicolon is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server.
  • In this tutorial, we will use semicolon at the end of each SQL statement.

Some of The Most Important SQL Commands

  • SELECT - extracts data from a database
  • UPDATE - updates data in a database
  • DELETE - deletes data from a database
  • INSERT INTO - inserts new data into a database
  • CREATE DATABASE - creates a new database
  • ALTER DATABASE - modifies a database
  • CREATE TABLE - creates a new table
  • ALTER TABLE - modifies a table
  • DROP TABLE - deletes a table
  • CREATE INDEX - creates an index (search key)
  • DROP INDEX - deletes an index

SQL SELECT Statement

The SELECT statement is used to select data from a database.
The result is stored in a result table, called the result-set.

SQL SELECT Syntax

SELECT column_name,column_name FROM table_name;
&
SELECT * FROM table_name;

Tuesday 22 April 2014

Basic Setups on Purchase & Order Management Module



Basic Setups on Purchase & Order Management Module

Purchase Module: 

1. Personnel

Define EmployeesDefine JobDefine PositionDefine Position HierarchyDefine Buyer


2. Approvals

Define Approval Assignments
Define Approval Group


3. Organization

Receiving Option
Financial Option
Purchasing Option

4. Create Document Types
5. Create Supplier

Order Management Module:

1. Define OM System parameters
2. Define System Options
3. Define Customer profile classes
4. Define Payment terms
5. Define Transaction Type:
Define line types
Define order types

6. Define Price list
7. Define Customer
8. Define Picking rule
9. Define Global Parameter
10. Define Document sequence
Assign the Documents

11. Define Release Sequence Rule
Picking
Setup

12. Define Release rule
13. Define Pick slip grouping rule
14. Define Grants and role definition

Courtesy : Mr. CS Boopathy

Tuesday 15 April 2014

Different Receiving Options


Different Receiving Options


We can use different methods for receiving goods in our subinventories

1.) Allow Substitute Receipts: It is used in case our supplier sends us a substitute item. It means we have ordered for item A but we have received item B.

Define relationship between items. Navigate to Items > Item Relationships à Click on New & give details as shown below




It means that we can receive VS ASL Item1 instead of VS ASL Item 2

Now navigate to Setup > Organizations > Receiving Options & check the Allow Substitute Receipt checkbox  & save the record




This option can be over written at PO level

Next is to create a PO. While creating a PO, we can overwrite the ‘Allow Substitute Receipts’ option


Save & approve the PO





Now navigate to Receiving > Receipts




Here we can see that item field is enabled & if we wish, we can change the item details


Save the record.



2.) Allow Unordered Receipts: When we go for Allowed Unordered Receipts then goods will be sent to us without a PO. But these goods can only be sent till receiving. If we wish to transact these goods to sub inventory then a PO is required.

Navigate to Setup > Organizations > Receiving Options

Check the ‘Allow Unordered Receipts’ checkbox & save the record

Now navigate to Receiving > Receipts à Click on Unordered & give details as shown below (Here we need to give each & every detail manually)






A Receipt number will be generated at Header level.

Now check the Receiving Transaction Summary. Navigate to Receiving > Receiving Transaction Summary à Search by receipt number


Here Transaction Type is Unordered Receipt

Next step is to create a PO. The Receipt Routing for this PO can be either Standard or Inspection (Because a Direct PO will send the goods directly to sub inventories)



Save & approve the PO



Now Navigate to Receiving > Match Unordered Receipts & give details as shown below




Now again Navigate to Receiving Transaction Summary form



Here we can see that the receipts are matched with PO.

Till now goods are in Receiving area. We need to move these goods to Sub Inventory. Navigate to Receiving > Receiving Transactions

Give Sub Inventory details & save the record


Again Navigate to Receiving Transaction Summary form



We can see that the goods are now moved to subinventory

3.) Express Transaction: It is used when the receipt routing method is Inspection but due to some business requirement, we do not want our goods to be inspected. Means they should be directly sent to subinventories


Navigate to Setup > Organization > Receiving Options




Check the ‘Allow Express Transactions’ checkbox & save the record

Now create a PO with Receipt Routing as Inspection Required & give subinventory details in Distribution Tab





Save & Approve the PO



Now Navigate to Receiving > Receipts à Here we can see that Express option is enabled. If we make any changes in the receipt. This option will be disabled so without making any changes click on Express



& save the record



4.) Cascade Transactions: In such transactions the quantity which is not fulfilled in first shipment will be fulfilled in subsequent shipments.

Navigate to Setup > Organizations > Receiving Options à Check Allow Cascade Transaction Check Box



Next is to create a PO. Navigate to Purchase Orders > Purchase Orders & give details as shown below






Save & approve the PO



Navigate to Receiving > Receipts à Give PO & Line Number in search criteria



We can see that Cascade Tab is enabled. Click on Cascade & give details as shown below






Give sub inventory details & save the record. Requery & you can see the price has been adjusted




5.) Blind Receiving: This option is used when we want our receipts to show 0 quantity no matter whatever is the quantity mentioned in PO. The purpose behind it is to count the goods once they arrive in your inventory & enter the quantity manually

Create a PO



Check receipt for this PO



Right now we are able to see the quantity in receipts. Now navigate to Setup > Organizations > Receiving Options àCheck Allow Blind Receiving checkbox



Now again check the receipt



Now we can see that the quantity is 0. Quantities will be counted & then entered into the receipts