Articles on Trending Technologies

Technical articles with clear explanations and examples

Return maximum value from records in MySQL

AmitDiwan
AmitDiwan
Updated on 10-Dec-2019 210 Views

Let us first create a table −mysql> create table DemoTable1449    -> (    -> PlayerId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> PlayerScore int    -> ); Query OK, 0 rows affected (0.69 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1449(PlayerScore) values(1040); Query OK, 1 row affected (0.12 sec) mysql> insert into DemoTable1449(PlayerScore) values(1450); Query OK, 1 row affected (0.34 sec) mysql> insert into DemoTable1449(PlayerScore) values(1890); Query OK, 1 row affected (0.72 sec) mysql> insert into DemoTable1449(PlayerScore) values(1650); Query OK, 1 row affected (0.25 sec)Display all records from the table using select statement ...

Read More

Check if the current date falls in a given date range using MySQL query

AmitDiwan
AmitDiwan
Updated on 10-Dec-2019 904 Views

Let us first create a table −mysql> create table DemoTable1448    -> (    -> StartDate date,    -> EndDate date    -> ); Query OK, 0 rows affected (0.46 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1448 values('2019-01-21', '2019-03-22'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable1448 values('2019-04-05', '2019-10-10'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable1448 values('2019-10-01', '2019-10-29'); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable1448 values('2018-12-31', '2019-12-31'); Query OK, 1 row affected (0.12 sec)Display all records from the table using select statement −mysql> ...

Read More

MySQL db query to fetch records from comma separate values on the basis of a specific value

AmitDiwan
AmitDiwan
Updated on 10-Dec-2019 198 Views

For this, you can use REGEXP in MySQL. Let’s say you want the row records wherein any of the comma separated value is 90. For this, use regular expression.Let us first create a table −mysql> create table DemoTable1447    -> (    -> Value varchar(100)    -> ); Query OK, 0 rows affected (0.58 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1447 values('19, 58, 90, 56'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable1447 values('56, 89, 99, 100'); Query OK, 1 row affected (0.21 sec) mysql> insert into DemoTable1447 values('75, 76, 65, ...

Read More

Set conditions in a MySQL stored procedure

AmitDiwan
AmitDiwan
Updated on 10-Dec-2019 783 Views

To set conditions in a stored procedure, use IF...ELSE in MySQL. Following is the syntax for if-else −IF yourCondition then       yourStatement1,  ELSE           yourStatement2,  END IF;Let us implement the above syntax in a stored procedure −mysql> DELIMITER // mysql> CREATE PROCEDURE IF_ELSE_DEMO(IN value int)    -> BEGIN    ->    SET @val=value;    ->    IF @val > 10 then    ->       select concat(@val, ' is greater than 10');    ->    ELSE    ->        select concat(@val, ' is less than 10 ');    ->    END ...

Read More

How to get substring of a string in jQuery?

Amit D
Amit D
Updated on 09-Dec-2019 6K+ Views

To get substring of a string in jQuery, use the substring() method. It has the following two parameters: from: The from parameter specifies the index where to start the substring. to: The to parameter is optional. It specifies the index where to stop the extraction. This is an optional parameter, which extracts the remaining string, when nothing is mentioned. Example You can try to run the following code to learn how to get substring of a string in jQuery:       jQuery subtring                  $(document).ready(function(){       $("#button1").click(function(){        var str1 = "Hello World!";        var subStr = str1.substring(0, ...

Read More

IMPORTING, EXPORTING and CHANGING Keywords in ABAP

Krantik Chavan
Krantik Chavan
Updated on 09-Dec-2019 5K+ Views

IMPORTING transfers a value from the caller to the called method by passing an actual parameterEXPORTING is just opposite to what IMPORTING does. IT passes value from the method to Caller.CHANGING is transferring the value from caller to method by a variable which is processed or changed and the changed value is passed back to the Caller. Thus it combines both IMPORTING and EXPORTING function.There are a couple of ways in which CHANGING can be used:CHANGING myvar or CHANGING VALUE(myvar)By using, CHANGING myvar , the value of a variable is changed and passed back to the caller or main program.Using ...

Read More

What are the best practices to improve jQuery selector performance?

Amit D
Amit D
Updated on 09-Dec-2019 2K+ Views

To enhance the performance of jQuery selector, you need to perform optimization. Here are some of the techniques:Cache SelectorCaching enhances the performance of the application. Cache your jQuery selectors for better performance. This can be done using the ID as your selector. For example, this caches the selector and stores it in variable.var $elm = $("#elm");Instead of using the jQuery ID selector, use the $elm variable:var $elm = $("#elm"); $elm.addClass(‘example’);Use ID selectorjQuery is a JavaScript library. In JavaScript, document.getElementById() is used to select the HTML element, which is the fastest way. Since jQuery is written on top of JavaScript, it ...

Read More

Calling external programs using SAP connector

Daniol Thomas
Daniol Thomas
Updated on 09-Dec-2019 338 Views

Yes, it is possible to address or call an external program using SAP connector SDK. From ABAP, you can reference external program by SAP’s RFC protocol.There are various SAP connector available for various programming languages. Few of them areJCo is the SAP Java connectorNCo is the .NET SAP connectorNW RFC SDK is the SAP NetWeaver RFC SDK for C/C++

Read More

Getting class of given method using T-code SE80 in SAP

Rishi Rathor
Rishi Rathor
Updated on 09-Dec-2019 3K+ Views

You would require calling transaction SE80 and then looking into Repository info system. Under that go to the class library and then to methods. You can specify selection criteria under standard selections.

Read More

Using combination of “AND” and “OR” in SELECT in ABAP

Vrundesha Joshi
Vrundesha Joshi
Updated on 09-Dec-2019 11K+ Views

You can use the following query:SELECT * FROM my_table WHERE condition 1 AND condition 2 AND ( id EQ '2' or id EQ ‘3’ ).Note: There should be space after and before bracket.Alternatively you can use IN statement as below:SELECT * FROM my_table WHERE condition 1 AND condition 2 AND EQ IN ('2', ‘3’ ).

Read More
Showing 54311–54320 of 61,248 articles
Advertisements