Accepting date strings (MM-dd-yyyy format) using Java regex?

Maruthi Krishna
Updated on 21-Feb-2020 10:39:39

4K+ Views

The following is the regular expression to match the date in the dd-MM-yyyy format.^(1[0-2]|0[1-9])/(3[01]|[12][0-9]|0[1-9])/[0-9]{4}$To match a date in a string in that format.Compile the above expression of the compile() method of the Pattern class.Get the Matcher object bypassing the required input string as a parameter to the matcher() method of the Pattern class.The matches() method of the Matcher class returns true if a match occurs else it returns false. Therefore, invoke this method to validate the data.Example 1import java.util.regex.Matcher; import java.util.regex.Pattern; public class MatchingDate {    public static void main(String[] args) {       String date = "01/12/2019";   ... Read More

Refreshing a schema after creating a table in SAP HANA database

John SAP
Updated on 21-Feb-2020 10:38:19

583 Views

Let us say you have executed the below create table SQL statement in HANA database −Create Table Demo_HANA ( ID INTEGER, NAME VARCHAR(10), PRIMARY KEY (ID) );To check the table in HANA database, navigate to AA_HANA11 schema and right click and refresh (F5). Navigate to “Table” folder and you can see new table with name Demo_HANA is created.

Inserting data in a table in SAP HANA

John SAP
Updated on 21-Feb-2020 10:37:26

2K+ Views

To insert the data, you need to run the Insert statement in SQL editor. “Demo_HANA” is table name.Insert into Demo_HANA Values (1,'John'); Insert into Demo_HANA Values (2,'Anna'); Insert into Demo_HANA Values (3,'Jason'); Insert into Demo_HANA Values (4,'Nick');In SQL editor, add INSERT statements and execute (F8) as below −

Changing storage type of table in SAP HANA database

John SAP
Updated on 21-Feb-2020 10:35:28

592 Views

You can also convert a Column store table to a Row store table or a Row store table to Column store table using ALTER table command.Alter table "AA_HANA11"."DEMO_HANA" column;

Development Perspective in SAP HANA Studio

Anil SAP Gupta
Updated on 21-Feb-2020 10:33:08

721 Views

You have different ABAP and Java Perspectives to perform application development and to host applications on HANA system −ABAPABAP Connectivity and IntegrationABAP ProfilingJavaJava BrowsingJava EEJava Type HierarchyJava ScriptThese perspective can be opened by navigating to, navigate to Window option at the top → Perspective → Open Perspective → Other

SQL statement to add a table as Virtual table in SAP HANA Smart Data Access

Anil SAP Gupta
Updated on 21-Feb-2020 10:29:56

1K+ Views

You can use following SQL statement for this −CREATE VIRTUAL TABLE ExampleCREATE VIRTUAL TABLE ABC.test_VT AT “ORCL_11G_WIN”.”NULL”.”OUTLN”.”Dept”;In this SQL statement, ABC.test_VT is Virtual table name“ORCL_11G_WIN”.”NULL”.”OUTLN”.”Dept”;- Remote location for creating Virtual table

What is the use of the Tab key in JShell in Java 9?

raja
Updated on 21-Feb-2020 10:22:01

307 Views

JShell can also provide an auto-completion feature when we partially type the name of an existing class, variable, or method by pressing the Tab key. If an item can't determine from what we entered, then possible options are provided.Pressing the Tab key in JShell performs one of the following tasks:If no other name matches what we have typed, JShell enters the rest of the name for us.If there are multiple names that begin with the same letters, then JShell displays a list of those names to help what to type next, then type the next letter(s) and press tab key again to complete the name.If no ... Read More

Details maintained under Name server in SAP HANA

Anil SAP Gupta
Updated on 21-Feb-2020 10:06:46

723 Views

In SAP HANA system architecture, Name server is used to maintain topology of SAP HANA system. It details complete information about system landscape- all hosts in distributed environment, active components and services running on each component in a distributed system environment.Topology details of SAP HANA system is maintained.Name server holds the detail of each component and services running on each host and hence reduces the re-indexing time.

Altering a database view in SAP HANA

SAP Expert
Updated on 21-Feb-2020 10:04:34

1K+ Views

You can alter the view, then we can use the Alter View command to alter the view.ExampleAlter view View_EmpInfo  as Select Emp_Details.Id, Emp_Details.EmplName, EmpProj.Projname from Emp_Details inner join EmpProjInfo on Emp_Details.Id=EmpProjInfo.Id;We have applied ALTER command to update an existing view with name- View_EmpInfo which is applying Inner Join on two tables on Id column to create a database view.

Dropping a SAP HANA database view

SAP Expert
Updated on 21-Feb-2020 10:03:55

1K+ Views

You can drop a view using Drop command like we drop a table. You can perform all the operations that you perform on a table on the database view.Drop view "AA_HANA11"."DEMO_TEST";

Advertisements