PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Influence of sort items
  • Handling the view items after a join
  • Joins: different search results according to the order of the views in the join
  • Hyper File 5.5
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
HMergeView (Function)
In French: HFusionneVue
ODBCNot available with this kind of connection
Warning
From version 20, the SQL views and the materialized views are available.
The views handled by this function correspond to the former mechanism of views. They do not correspond to SQL views or to materialized views.
Creates a HFSQL view from two views created beforehand (HCreateView). Several operations can be performed when merging the views.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
// Merge two views
MyView is Data Source
ViewCustomer84 is Data Source
...
HMergeView(MyView, ViewCustomer84, ViewCustomer84, hViewUnion, "+CustName")
Syntax
<Result> = HMergeView(<Name of Destination View>, <First View>, <Second View>, <Type of Operation> , <Sort Item of First View> [, <Sort Item of Second View>] [, <Creation Mode> [, <Page Size>]])
<Result>: Boolean
  • True if the view was created,
  • False if a problem occurred. HError is used to identify the error.
<Name of Destination View>: Character string
Name of view to create, result of operation performed on the two specified views.
<First View>: Character string (with or without quotes)
Name of view taking part in the operation.
<Second View>: Character string (with or without quotes)
Name of view taking part in the operation.
<Type of Operation>: Integer constant
Operation that will be performed between the two specified views:
hViewIntersectionRows common to <First View> and to <Second View>.
hViewJoinJoin between the first view and the second view.
hViewSubtractionRows of <First View> without the common rows of <Second View>.
hViewUnionCombination of all rows of <First View> and <Second View>.
The structure of views must be identical.
hViewUnionExCombination of all non-common rows of <First View> and <Second View>.
The structure of views must be identical.
<Sort Item of First View>: Character string
Corresponds to the name of the item that will be used on the first view to perform the operation. This item will also be used to sort the destination view.
<Sort Item of Second View>: Optional character string
Corresponds to the name of the item that will be used on the second view to perform the operation. If this parameter is not specified, it is equal to the value of <Sort Item of First View>.
<Creation Mode>: Optional Integer constant (or combination of constants)
Configures the creation mode of view.
hViewAddStores the view content during the next call to HExecuteView.
hViewLockingThe records read in the data file and included in the view are locked.
Windows Mobile This option is available for the HFSQL Client/Server data files and for the data files handled by a native access. This option is not available for the HFSQL Mobile data files. Indeed, no record can be locked. This limit is due to the operating system of Pocket PC.
hViewPostponedThe view is created but it will be run later by HExecuteView.
hViewDistinctThe view is created without duplicates according to the sort key.
hViewDefaultDefault creation mode of view.
hViewExclusiveOptimizes the creation time of view by locking the entire source data file.
hViewBreakableThe view creation can be interrupted by pressing the ESC key.
<Page Size>: Optional integer
Number of records per page (for a view used by remote access).
Remarks

Influence of sort items

The sort items are used to define the items on which the requested operation will be performed. Therefore, an intersection operation will return all the records of the first view for which <Sort Item of First View> is equal to <Sort Item of Second View> for at least one record of the second view.

Handling the view items after a join

The items issued from a join are named as follows:
  • if the item name exists in only one of the source views, this item name is kept in the join
  • if the item name exists in both source views, the item of the join corresponding to the item of the second view is renamed "NameView2_ItemName"
The following syntax also allows you to access the items found in the join:
<Name of Source View>_<Item Name>
Examples:
  • The View1 named "CustomerView" contains the items: CustomerID, OrderID, Name
  • The View2 named "OrderView" contains the items: OrderID, Name, Product
  • The join named "CustomerOrder" is created from the views named "CustomerView" and "OrderView" on the "OrderID" item. The "CustomerOrder" view contains the following items: CustomerID, OrderID, Name, OrderView_Name, Product.
Accessing the item:Syntax used
CustomerIDCustomerOrder.CustomerID
or
CustomerOrder.CustomerView_CustomerID
OrderIDCustomerOrder.OrderID
or
CustomerOrder.CustomerView_OrderID
or
CustomerOrder.OrderView_OrderID
NameCustomerOrder.Name
or
CustomerOrder.CustomerView_Name
OrderView_NameCustomerOrder.OrderView_Name
ProductCustomerOrder.Product
or
CustomerOrder.OrderView_Product

Joins: different search results according to the order of the views in the join

During a join between two views, the index of second view is used to perform searches on the result of the join. The search result can differ depending on the characteristics of the index used in the join.
Example:
  • Characteristics of key item named MyItem in View1: Case-insensitive searches
  • Characteristics of item named MyItem in View2: Case-sensitive searches
A merge is performed between these two views. Depending on the order of the merged views, the result of the search will be different:
  • HMergeView(View3, View1, View2): the search is performed on view2: 15 records are found.
  • HMergeView(View3, View2, View1): the search is performed on view1: 63 records are found.
WINDEVWEBDEV - Server codeHyper File 5.5

Hyper File 5.5

To handle a database in Hyper File 5 format with HMergeView, the merge must be performed by HCreateView_55.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Windows Mobile wp230hf.dll
Linux wd230hf.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment