Print Distinct Elements of Integer Array in Chash

karthikeya Boyini
Updated on 22-Jun-2020 09:22:53

608 Views

We have set an array and a dictionary to get the distinct elements.int[] arr = {    88,    23,    56,    96,    43 }; var d = new Dictionary < int, int > ();Dictionary collection allows us to get the key and value of a list.The following is the code to display distinct elements of a given integer array −Example Live Demousing System; using System.Collections.Generic; namespace Demo {    public class Program {       public static void Main(string[] args) {          int[] arr = {             88,   ... Read More

Creating Virtual Tables from Remote Source in SAP HANA

Anil SAP Gupta
Updated on 22-Jun-2020 09:22:11

2K+ Views

When a remote source is added, you can see all the existing tables under that data source in HANA Studio. Next is to create virtual table mapping to data in the remote data sources in SAP HANA Studio. This can be done using GUI option.To add a table as a virtual table, you need to navigate to remote data source → Schema name → Table name → Right-click and Add as Virtual TableBelow shows how you can add a table as a Virtual Table using HANA Studio.

Determine If Any Two Integers in Array Sum to Given Integer

Arjun Thakur
Updated on 22-Jun-2020 09:21:51

1K+ Views

The following is our array −int[] arr = new int[] {    7,    4,    6,    2 };Let’s say the given intger that should be equal to sum of two other integers is −int res = 8;To get the sum and find the equality.for (int i = 0; i < arr.Length; i++) {    for (int j = 0; j < arr.Length; j++) {       if (i != j) {          int sum = arr[i] + arr[j];          if (sum == res) {             Console.WriteLine(arr[i]); ... Read More

Content of Property orcl.ini File in SAP HANA Smart Data Access

Anil SAP Gupta
Updated on 22-Jun-2020 09:21:19

888 Views

When you create a new remote data source, SAP HANA Smart data access parse the respective property configuration file. With the use of config file- features, function mappings, data type mappings, and other properties will be linked together with the data source. This decides the communication between the SAP HANA and the data source.You can see part of the content of property_orcl.ini shown below −

Different ODBC Connection Types under SAP HANA Smart Data Access

Anil SAP Gupta
Updated on 22-Jun-2020 09:20:45

732 Views

You can check the following example to create a new remote source −CREATE REMOTE SOURCE TEST_11g ADAPTER “odbc” CONFIGURATION FILE ‘property_orcl.ini’ CONFIGURATION ‘DSN=oral11g_lnx’ WITH CREDENTIAL TYPE ‘PASSWORD’ USING ‘user=username;password=password′;In above SQL statement, can be one of −  ASEODBC, IQODBC,TDODBC, HIVEODBC,ODBC. Obviously, ASEODBC is for Sybase ASE as data source, IQODBC is for Sybase IQ, TDODBC is for Teradata Database, HIVEODBC is for Hadoop.

Connecting to MSSQL and MaxDB using SAP HANA Smart Data Access

Anil SAP Gupta
Updated on 22-Jun-2020 09:20:14

519 Views

In SAP HANA SPS07, following data sources are supported under Smart data access −Sybase ASESAP Sybase IQTeradata 13.0 or higherApache Hadoop 2.3MSSQL 11Oracle 12cWhen you click on the Adapter name while creating a new remote data source, you can see a list of all supported databases.You can also see in the above snapshot that all databases use the ODBC connection for a remote data sources.

C# Program to Perform Currency Conversion

Chandu yadav
Updated on 22-Jun-2020 09:19:32

5K+ Views

Let’s say you need to get the value of 10 dollars in INR.Firstly, set the variables: double usd, inr, val;Now set the dollars and convert it to INR.// how many dpllars usd = 10; // current value of US$ val = 69; inr = usd * val;Let us see the complete code −Example Live Demousing System; namespace Demo {    public class Program {       public static void Main(string[] args) {          Double usd, inr, val;          // how many dpllars          usd = 10;          // current value of US$          val = 69;          inr = usd * val;          Console.WriteLine("{0} Dollar = {1} INR", usd, inr);       }    } }Output10 Dollar = 690 INR

Connection Used in SAP HANA Smart Data Access

Anil SAP Gupta
Updated on 22-Jun-2020 09:19:06

507 Views

The remote system access communication is based on ODBC connection, and ODBC drivers for remote data sources − ASEODBC, IQODBC, and TDODBC. To create a remote data source, Right-click on Remote Sources → New Remote Source

Find Date Difference in C#

Samual Sam
Updated on 22-Jun-2020 09:18:41

136 Views

To find the difference between two dates in C#, you need to first set two dates to be compared using the DateTime object. We will use the DateTime class in C#.Date 1DateTime date1 = new DateTime(2018, 09, 15); Console.WriteLine("Date 1 : {0}", date1);Date 2DateTime date2 = new DateTime(2018, 09, 28); Console.WriteLine("Date 2 : {0}", date2);Now let us compare both the dates in C#. The following is an example to compare dates in C#.Example Live Demousing System; namespace Program {    class Demo {       static int Main() {          DateTime date1 = new DateTime(2018, 09, 15); ... Read More

Resetting a Customized Perspective in SAP HANA Studio

Anil SAP Gupta
Updated on 22-Jun-2020 09:18:26

515 Views

Yes, if you customize a perspective, and you want to reset it, you can select Reset PerspectiveHere you have an option that allows you to perform following options on a Perspective −Customize PerspectiveSave PerspectiveReset PerspectiveClose PerspectiveClose All Perspective

Advertisements