Samual Sam has Published 2492 Articles

Multidimensional Expression and its use in SAP BPC

Samual Sam

Samual Sam

Updated on 12-Mar-2020 12:36:48

367 Views

MDX is a query language developed by Microsoft to query OLAP cubes. In OLAP cubes, data is structured as multidimensional. You have a fact table in middle and dimension tables surrounding fact tables. MDX is used to query STAR schema cubes like this and generate results for different purposes.MDX query ... Read More

How to call RFC in SAP using an ETL job?

Samual Sam

Samual Sam

Updated on 12-Mar-2020 12:34:24

315 Views

You need to expose RFC as Web Service in SAP system. To create a Web Service, you have to open Transaction SE80 and this will open ABAP Workbench.You can define Web Service for −RFC Capable function modulesFunction GroupsBAPIsMessage InterfacesIn Web Service Wizard, enter the name and short text and select ... Read More

How to display MySQL Table Name with columns?

Samual Sam

Samual Sam

Updated on 09-Mar-2020 06:48:28

728 Views

You can use INFORMATION_SCHEMA.COLUMNS table to display MySQL table name with columns. The syntax is as follows −SELECT DISTINCT TABLE_NAME, Column_Name FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'yourDatabaseName';Here, we have a database with the name ‘sample’ with tables. The query is as follows to display table name along with column name ... Read More

What happens when a negative value is inserted to UNSIGNED column in MySQL?

Samual Sam

Samual Sam

Updated on 06-Mar-2020 10:07:02

542 Views

Error occurs when you set a negative value to UNSIGNED column in MySQL. For example, let us first create a table with an UNSIGNED field −mysql> create table UnsignedDemo    -> (    -> Id int UNSIGNED    -> ); Query OK, 0 rows affected (0.79 sec)The error is as ... Read More

Select and filter the records on month basis in a MySQL table?

Samual Sam

Samual Sam

Updated on 06-Mar-2020 07:03:12

512 Views

You can use aggregate function SUM() with GROUP BY clause to achieve this.Let us create a table. The query to create a table is as follows −mysql> create table SelectPerMonthDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> Price int,    -> PurchaseDate datetime ... Read More

How to calculate catalan numbers with the method of Binominal Coefficients using Python?

Samual Sam

Samual Sam

Updated on 05-Mar-2020 11:09:25

106 Views

To calculate Catalan numbers using binomial Coefficients, you first need to write a function that calculates binomial coefficients. exampledef binomialCoefficient(n, k):    # To optimize calculation of C(n, k)    if (k > n - k):       k = n - k    coeff = 1    for i ... Read More

How to compare numbers in Python?

Samual Sam

Samual Sam

Updated on 05-Mar-2020 10:48:16

14K+ Views

You can use relational operators in python to compare numbers(both float and int) in python. These operators compare the values on either side of them and decide the relation among them. Assume variable a holds 10 and variable b holds 20, thenOperatorExample==(a == b) is not true.!=(a != b) is ... Read More

How to Find the Largest Among Three Numbers using Python?

Samual Sam

Samual Sam

Updated on 05-Mar-2020 10:35:19

902 Views

You can create a list of the three numbers and call the max method to find the largest among them. examplemy_list = [10, 12, 3] print(max(my_list))OutputThis will give the output −12ExampleIf you want to calculate it yourself, you can create a simple function likedef max_of_three(a, b, c):    if a > ... Read More

How to generate sequences in Python?

Samual Sam

Samual Sam

Updated on 05-Mar-2020 10:09:37

2K+ Views

List comprehensions in python are useful for such tasks. These are very powerful expressions that you can use to generate sequences in a very concise and efficient manner. For example, if you want first 100 integers from 0, you can use −Examplea = [i for i in range(100)] print(a)OutputThis will ... Read More

What are the best practices for using loops in Python?

Samual Sam

Samual Sam

Updated on 05-Mar-2020 10:05:05

584 Views

This is a language agnostic question. Loops are there in almost every language and the same principles apply everywhere. You need to realize that compilers do most heavy lifting when it comes to loop optimization, but you as a programmer also need to keep your loops optimized.It is important to ... Read More

Advertisements