Friday 27 October 2017

What are the Aggregate Functions in Oracle SQL

Aggregate Functions


MINreturns the smallest value in a given column
MAXreturns the largest value in a given column
SUMreturns the sum of the numeric values in a given column
AVGreturns the average value of a given column
COUNTreturns the total number of values in a given column
COUNT(*)returns the number of rows in a table

Aggregate functions are used to compute against a "returned column of numeric data" from your SELECT statement. They basically summarize the results of a particular column of selected data.

What is the difference between Lookup and Value Set

"lookup type" consists of lookups that are static values in a list of values. Lookup code validation is a one to one match.
A table-validated "value set" may consist of values that are validated through a SQL statement, which allows the list of values to be dynamic.
Tip
You can define a table-validated value set on any table, including the lookups table. Thus, you can change a lookup type into a table-validated value set that can be used in flexfields.
Area of Difference
Lookup Type
Value Set
List of values
Static
Dynamic if the list is table-validated
Validation of values
One to one match of meaning to code included in a lookup view, or through the determinant of a reference data set
Validation by format or inclusion in a table
Format type of values
char
varchar2, number, and so on
Length of value
Text string up to 30 characters
Any type of variable length from 1 to 4000
Duplication of values
Never. Values are unique.
Duplicate values allowed
Management
Both administrators and end-users manage these, except system lookups or predefined lookups at the system customization level, which can't be modified.
Usually administrators maintain these, except some product "flexfield" codes, such as GL for Oracle Fusion General Ledger that the end-users maintain.
Both lookup types and value sets are used to create lists of values from which users select values.
A lookup type cannot use a value from a value set. However, value sets can use standard, common, or "set-enabled"lookups.

Script to update salespersons customer site wise in oracle apps R12

SELECT * FROM HZ_PARTIES WHERE PARTY_NAME LIKE 'DEENA VISION%'; SELECT * FROM HZ_CUST_ACCOUNTS_ALL WHERE PARTY_ID =94043 ; SE...