MS4BI HELP 2019

by MS4script
01-Introduction
Preface & Copyright
Getting started
Demos Simple
02- Declarations
Structure
Type
03- Instructions
Conditions if,do,while..
String functions Str..()
Get + Include functions Get, Include..
Date-Time Day, Time, Year.
Display
Call
Formulas Complex
04- Database
Connector Ado, Odbc, Dsn, SAP, Ms4…
Connect DB Create, delete
Import DataSource Import, Consolidation
Administration Admin, User
05- Sql-Query
Sql
Query Form : BTS,SHOW
Grid option
06- Charts
Forms Show, Win, Image, Excel, Morris...
Pie Std, Donut, 3D...
Bar Std, Stack, Line, Area, Plot
Radar
QrCode, Gauge
Step, Stock...
,Google,Leaflet... GeoMap
,Gantt,Timeline,Org.
07- Dashboard
Form tab, no tab
Responsive UI
08- Report
Report Hierarchy
Report Design
09- Filters
Dialogue + Call
10- Menus
Menu Design
Menu Frameset
Menu Special
11-UI : Responsive
Tables Responsive,Frame,position
List Group
Text
Panel Header, body, Footer
Button Button, Progress Bar
Icon & Button
Collapse Group, Panel
Notifications
12- Encryption
Encrypt
Decrypt
13- Windows
Dialogue
Picture, Frame, Button..
MsgBox
Grid
14- Cloud.
Account Open
15- Css, html, Php, js.
Insert Native language Begin_sw..End_Sw
16-Install + tools.
Installation & Configuration This Menu
Generate Native... Php, Html, js..
Code Generator Ms4 Script
MarkDown Ms4 Script
Source Code Menu Help This Menu
written with ms4script
     

BASIC HELP : MS4BI by MS4script 2019 version 1

Chapter 4 : DATABASES

KEYWORD : IMPORT NEW DB

:

Definition

- Imports a file or table from an ADO, ODBC, DSN, or SAP data source
- Creates and adds a table to an MS4DB database

Syntax

 		 
			ConnectDB{Driver}( NameDB1  );
			  IMPORT : NEW MS4DB   
		      BEGIN  
        		 	  ConnectDB {Ms4DB} (DB Name MS4BI )  , 
		    		  Create:Table(Table Name XXXX MS4BI) 
			  END 
				(" SELECT   * from	tableName / NameDB1     " ) ;	
	

Example

 		   
text : LCurrentDir , Lnewdb ,table1  ;
Getcurrentdir(LCurrentDir);
Concatene  LCurrentDir,"ms4bilangbasic.db" into Lnewdb;
Concatene  LCurrentDir,"list_of_cities_in_china-44j.xls" into Table1; 
 
    ConnectDB{Ado:"xls"}(Table1);
     Import : New Ms4Db   
      BEGIN  
          ConnectDB {Ms4DB} (Lnewdb)  , 
           Create:Table("[ms4lang]") 
	 END 
 (" SELECT  *  from  [Sheet1$]   "  );

	

Remarks

Excel : sheet : [NameSheet$] : the $ is required to be able to access the sheet

See also

CONNECTDB, CREATEDB ,TABLEEXIST , DBDELETE, MS4_SQL, DESTROYENVSQL



KEYWORD : IMPORT NEW DB CONSOLIDATION

:

Definition

- Imports and consolidates

several files or tables

from ADO, ODBC, DSN, SAP data sources
- Creates and inserts all of the files or tables into a single table in a MS4DB database.

Syntax

 		 
			ConnectDB{Driver}(Consolidated Table Name);
			  IMPORT : NEW MS4DB   
		      BEGIN  
        		 	  ConnectDB {Ms4DB} (DB Name)  , 
		    		  Create:Table(Table Name ) 
			  END 
				(" SELECT   * from	      " ) ;	
	

Example

 		   
BEGIN  CONSOLIDATION  tables : japanese and chinese -> into  Excel table temp  * 
 SetUniCode(1);
** sheet 1 
 	ConnectDB{Ado:"xls"}( LFile1Excel);
 	display "insert Table Japanese : CONSOLIDATION 1  ";
  	Ms4_SQL{Ado:"xls"}(" SELECT  * into " + " %s " + "  from [中国最大の都市のリスト$]", Table1SheetJapanese) return x ;
  
** sheet 2 
 	ConnectDB{Ado:"xls"}(Lfile2Excel);
	display "insert Table Chinese : CONSOLIDATION 2   ";
	Ms4_SQL{Ado:"xls"}(" SELECT  * into  %s " + " from [Sheet1$]",Table1SheetChinese) return x;
  	
END ;
  BEGIN ** Create a new table in MS4 DB
 ** *******************************************************************	
 ** INSERT a FILE xls, xlsx, txt ..etc into MS4 DB
 ** Create Cube : ms4LangConsolidation Example
 ** *******************************************************************	
			ConnectDB{Ado:"xls"}(Table1);  /* Consolidation table!! lang1$ + lang2$ */
			  IMPORT : New Ms4Db   
		      BEGIN  
        		 	  ConnectDB {Ms4DB} (Lcurrentdb)  , 
		    		  Create:Table("[ms4LangConsolidation]") 
			  END  
				(" SELECT   a.SNO , 都市名 as CityName, 英語 as CityEnglish, POPULATION ,"+
				 " 備考 as proforma, CITY  , 城市 As CityChinese, "+
				 " PROVINCE, PREFECTURE  , TYPELevel , FOUNDED ,b.sno as snoduplicate" +
				 " from  [lang1$] as a  ,[lang2$] as b   " +
				        " where  a.英語 = b.city order by   b.city  "  );
    END ;						
	

Prerequisites

- Create a single EXCEL file where each sheet is the table copied by the instruction Ms4_SQL{Ado:"xls"}(" SELECT * into ......... file 1 or table 1
- When importing into the MS4DB database, create the relationship(s) with each sheets using the instruction WHERE a = b and b =c ...

Remarks

Excel : sheet : [NameSheet$] : The $ is required to access the sheet

ALL Examples Imports/connections :

driver::\MondaySoftware\MS4BI\zConnectorsx-Import\Examples

See also

CONNECTDB, CREATEDB, TABLEEXIST, DBDELETE, DESTROYENVSQL



Interested in our project? contact@monday-software.com
The Monday Software team


Copyright 2020 by Monday Software

the official sites :
www.monday-software.com
www.ms4bi.com
demos.ms4bi.com
getms4bi.com
getms4bifree.com
cloud.ms4bi.com
cloud.testing.ms4bi.com
www.ms4script.com

Our purpose : Keep it simple !


written with ms4script
  • MS4BI v.01.0027.01.2020
  • MS4BIRE v.01.0021.10.2019
  • MS4SCRIPT v.01.0027.01.2020
  • help 06/2019

MS4BI in 5 minutes