Nikitha N

Nikitha N

54 Articles Published

Articles by Nikitha N

Page 4 of 6

What does the explicit keyword mean in C++?

Nikitha N
Nikitha N
Updated on 24-Jun-2020 4K+ Views

The explicit keyword in C++ is used to mark constructors to not implicitly convert types. For example, if you have a class Foo −class Foo { public:     Foo(int n); // allocates n bytes to the Foo object     Foo(const char *p); // initialize object with char *p };Now if you tryFoo mystring = 'x';The char 'x' is implicitly converted to int and then will call the Foo(int) constructor. But this is not what was intended. So to prevent such conditions and make the code less error-prone, define the constructor as explicit −Example class Foo {    public:   ...

Read More

How Can we use MySQL DISTINCT clause with WHERE and LIMIT clause?

Nikitha N
Nikitha N
Updated on 22-Jun-2020 6K+ Views

By using the WHERE clause with a DISTINCT clause in MySQL queries, we are putting a condition on the basis of which MySQL returns the unique rows of the result set. By using the LIMIT clause with a DISTINCT clause in MySQL queries, we are actually providing a perimeter to the server about a maximum number of unique rows of the result set to be returned.ExampleWe can use WHERE and LIMIT clause with DISTINCT as follows on the table named ‘testing’ −mysql> Select * from testing; +------+---------+---------+ | id | fname | Lname | ...

Read More

What would be the effect on summary output when I use explicit sort order (ASC or DESC) with column names in the GROUP BY list along with "WITH ROLLUP" modifier?

Nikitha N
Nikitha N
Updated on 22-Jun-2020 201 Views

In the case, where we use explicit sort order (ASC or DESC) with column names in the GROUP BY list along with the “WITH ROLLUP” modifier, the summary rows added by ROLLUP still appear after the rows from which they calculated regardless of the sort order.As we know that the default sort order is ascending hence in the example below if we will not use any explicit sort order then the output would be as follows −mysql> Select sr, SUM(Price) AS Price from ratelist Group by sr with rollup; +-----+-------+ | sr  | Price | +-----+-------+ |  1  |   ...

Read More

How can I create a MySQL stored procedure that returns multiple values from a MySQL table?

Nikitha N
Nikitha N
Updated on 22-Jun-2020 2K+ Views

We can create a stored procedure with both IN and OUT parameters to get multiple values from a MySQL table. To make it understand we are taking an example of a table named ‘student_info’ having the following data −mysql> Select * from student_info; +------+---------+------------+------------+ | id | Name | Address | Subject | +------+---------+------------+------------+ | 101 | YashPal | Amritsar | History | | 105 | Gaurav | Jaipur | Literature | | 110 | Rahul ...

Read More

What are the prerequisites for starting writing and using MySQL stored procedure?

Nikitha N
Nikitha N
Updated on 22-Jun-2020 351 Views

We must have the following prerequisites before starting writing and using MySQL stored procedures −MySQL VersionAs we know that MySQL 5 introduced stored procedures, hence first of all we need to check for the version of MySQL before staring writing and using stored procedures. It can be done with the following query −mysql> Select VERSION(); +-----------+ | VERSION() | +-----------+ | 5.7.20    | +-----------+ 1 row in set (0.10 sec)Privileges for the current userActually, CREATE PROCEDURE and CREATE FUNCTION require the CREATE ROUTINE privilege. By default, MySQL automatically grants the ALTER ROUTINE and EXECUTE privileges to the routine creator. ...

Read More

How can I start MySQL Server?

Nikitha N
Nikitha N
Updated on 20-Jun-2020 580 Views

There are following two methods to start MySQL server −Using Command LineWe need to run ‘mysqld’ program to run MySQL server. It can be started using the command line with the help of the following command −C:\mysql\bin>mysqldWe will see nothing after entering the ‘mysqld’ command because it will not print any message in the command window. We should have to trust that MySQL server is running now.Using file explorer windowWe can also start MySQL server by double-clicking the file \mysql\bin\mysqld.exe on our computer.

Read More

How do I generate days from the range of dates in MySQL?

Nikitha N
Nikitha N
Updated on 20-Jun-2020 2K+ Views

It can be done with the help of following query which uses adddate() function and we are generating the days between ‘2016-12-15’ and ‘2016-12-31’ −mysql> select * from -> (select adddate('1970-01-01', t4*10000 + t3*1000 + t2*100 + t1*10 + t0) gen_date from -> (select 0 t0 union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0, -> (select 0 t1 union select 1 union select 2 union select 3 union ...

Read More

Suppressing duplicate entries in classical and ALV report in SAP ABAP

Nikitha N
Nikitha N
Updated on 12-Mar-2020 2K+ Views

To delete adjacent duplicate entries in an internal table, you can use the below command −DELETE ADJACENT DUPLICATE ENTRIES FROM                      [COMPARING ...                          |ALL FIELDS].Also, consider the below points −The system deletes all adjacent duplicate entries from the internal table . Entries are duplicate if they fulfill one of the following compare criteria:Without the COMPARING addition, the contents of the key fields of the table must be identical in both lines.If you use the addition COMPARING ...

Read More

Loading External Libraries in SAP UI5

Nikitha N
Nikitha N
Updated on 12-Mar-2020 2K+ Views

External libraries can be inserted using a file in a normal script tag. SAP UI5 also supports JQuery so it can be done by extending your heading from the controller.var s = document.createElement("script"); s.type = "text/javascript"; s.src = "http://domainname.com/somescript"; $("head").append(s);You can also add any external file using the following command −jQuery.sap.registerModulePath("ModuleName","http://Domainname.com"); jQuery.sap.require("ModuleName.jsFileName");You can navigate to the following path for more details−https://blogs.sap.com/2016/04/22/include-external-javascript-library-in-sapui5/

Read More

Difference between SAP PI/PO and ESB

Nikitha N
Nikitha N
Updated on 12-Mar-2020 1K+ Views

SAP PI/PO is more relevant to use when your entire landscape is of SAP modules. SAP Process Integration is a part of the SAP NetWeaver platform. It is called SAP NetWeaver Exchange Infrastructure XI in NetWeaver 7.0 ehp2 and older versions. SAP NetWeaver Process Integration is a part of the NetWeaver software component and is used for the exchange of information in company’s internal system or with external parties.SAP PI/XI enables you to set up cross-system communication and integration and allows you to connect SAP and non-SAP systems based on a different programming language like Java and SAP ABAP. It ...

Read More
Showing 31–40 of 54 articles
Advertisements