Swarali Sree

Swarali Sree

48 Articles Published

Articles by Swarali Sree

Page 4 of 5

How does MYSQL control flow function CASE works?

Swarali Sree
Swarali Sree
Updated on 11-Feb-2020 435 Views

MySQL CASE statement is a flow control function that allows us to build conditions inside a query such as SELECT or WHERE clause. We have two syntaxes of CASE statementSyntax-1CASE val WHEN compare_val1 THEN result1 WHEN compare_val2 THEN result2 . . . Else result ENDHere in this 1st syntax, if the val is equal to compare_val1 then the CASE statement returns result1. If the val is equal to compare_val2 then the CASE statement returns result2 and so on.In case if the val does not match any compare_val then the CASE statement returns the result specified in ELSE clause.Examplemysql> Select CASE 100 ...

Read More

What happens if the position of insertion, in MySQL INSERT() function, is out of range?

Swarali Sree
Swarali Sree
Updated on 06-Feb-2020 156 Views

MySQL INSERT() function performs no insertion if the position of insertion is out of range. The position of insertion can be out of range in the case when we pass a negative or 0(zero) value or the value goes beyond the value of a total number of characters in an original string by 2. It can be understood with the help of the following example −ExampleThe query below will perform no insertion because the position of insertion is out of range i.e. a negative value.mysql> Select INSERT('Virat', -1, 5, 'Kohli'); +-------------------------------+ | INSERT('Virat', -1, 5, 'Kohli') | +-------------------------------+ | Virat ...

Read More

How to check statement of creating a particular MySQL database?

Swarali Sree
Swarali Sree
Updated on 28-Jan-2020 166 Views

With the help of CREATE DATABASE db-name command, we can check the statement of creating any MySQL database.mysql> SHOW CREATE DATABASE Sample; +----------+-------------------------------------------------------------------+ | Database | Create Database                                                   | +----------+-------------------------------------------------------------------+ | sample   | CREATE DATABASE `sample` /*!40100 DEFAULT CHARACTER SET latin1 */ | +----------+-------------------------------------------------------------------+ 1 row in set (0.00 sec)The output shows how MySQL database named Sample has been created.

Read More

When are two tables connected with MySQL FOREIGN KEY then how can we say that the integrity of data is maintained in child table?

Swarali Sree
Swarali Sree
Updated on 28-Jan-2020 222 Views

Actually, foreign keys enforce referential integrity that helps us to maintain the consistency and integrity of the data automatically. It can be understood with the example of two tables named ‘customer’ and ‘orders’. Here, ‘customer’ is the parent table and ‘orders’ is the child table. We cannot create an order for a non-existent customer. It can be demonstrated by inserting the values in both the tables as follows −mysql> Select * from Customer; +----+--------+ | id | name   | +----+--------+ | 1  | Gaurav | | 2  | Raman  | | 3  | Harshit| | 4  | Aarav  | ...

Read More

Print screen using VBA in SAP

Swarali Sree
Swarali Sree
Updated on 16-Dec-2019 950 Views

If you are using SendKeys then avoid using it. I had used it in the past project and it seems to be inconsistent and error-prone.You can use the below snippet at the top of the module and call it wherever required.Option Explicit Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _bScan As Byte,  ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Const KEYEVENTF_KEYUP = &H2 Private Const VK_SNAPSHOT = &H2C Private Const VK_MENU = &H12 Sub PrintScreen()     keybd_event VK_SNAPSHOT, 1, 0, 0  End Sub

Read More

Differentiate between Transaction code SE01, SE09, and SE10 in SAP ECC system?

Swarali Sree
Swarali Sree
Updated on 11-Dec-2019 979 Views

In early sap version, SE09 and SE10 perform different functions as below:SE09 was widely used in workbench/development of transports.SE10 was widely used in customizing transports.In newer version now, both the Transactions SE09 and SE10 perform the same function as shown in below snapshot.In addition, SE01 is an extension combining SE09 and SE10 functions and adding lot other functions as shown in below snapshot:

Read More

Difference between SE01, SE09 and SE10 Transactions in SAP

Swarali Sree
Swarali Sree
Updated on 11-Dec-2019 5K+ Views

Both SE09 and SE10 were used in earlier releases of SAP for different purposes.SE09 – This was used for development of transportsSE10 – This was used for customizing the transports request. When you run SE10 in SAP ERP, you will get the same screen as in T-Code SE09 of Transport Organizer.In the latest version of SAP NetWeaver, both the Transactions are same.SE01 –This combines the features of both SE09 and SE10. Apart from that, there are many other features included in it like displaying specific transport request.

Read More

Using logarithm in SAP ABAP

Swarali Sree
Swarali Sree
Updated on 10-Dec-2019 800 Views

Yes, there is a log function. You can use it to implement your requirement.Here is a code snippet which might be of some help for your implementation.DATA:  NUMBER  TYPE INT,        BASE TYPE INT,        RESULT  TYPE FLOATLet’s say:Number=16 BASE=4 RESULT= log(NUMBER)/log(BASE)RESULT will be 2.

Read More

How many public classes of the same name it can have in Java?

Swarali Sree
Swarali Sree
Updated on 30-Jul-2019 2K+ Views

A Java file contains only one public class with a particular name. If you create another class with same name it will be a duplicate class. Still if you try to create such class then the compiler will generate a compile time error. Example public class Example { } public class Example{ public void sample(){ System.out.println("sample method of the Example class"); } public void demo(){ System.out.println("demo method of the Example class"); } ...

Read More

What are checked exceptions in Java?

Swarali Sree
Swarali Sree
Updated on 30-Jul-2019 978 Views

A checked exception is an exception that occurs at the time of compilation, these are also called as compile time exceptions. These exceptions cannot simply be ignored at the time of compilation; the programmer should take care of (handle) these exceptions. if you use FileReader class in your program to read data from a file, if the file specified in its constructor doesn't exist, then a FileNotFoundException occurs, and the compiler prompts the programmer to handle the exception. Example import java.io.File; import java.io.FileReader; public class FilenotFound_Demo { public static void main(String args[]) { ...

Read More
Showing 31–40 of 48 articles
Advertisements